arrow-keys

A stream of arrow keys

npm install arrow-keys
20 downloads in the last week
35 downloads in the last month

arrow-keys

A stream of arrow keys

Example

Is compatible with delta-stream. Emits x, y change in "position" in reaction to arrow keys being pressed.

var ArrowKeys = require("arrow-keys")
    , delta = ArrowKeys()

delta.on("change", function (key, value) {
    // y,-1   x,-1   x,1   y,1
    console.log(key, ",", value)
})

/* NOW MASH UP LEFT RIGHT DOWN IN THAT ORDER */

Installation

npm install arrow-keys

Contributors

  • Raynos

MIT Licenced

npm loves you