Arrow keys for all!
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.gitignore
LICENCE
Makefile
README.md
index.js
package.json

README.md

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