arrow-keys

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i arrow-keys

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • raynos
  • mattesch