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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    3
  • 0.3.0
    0
  • 0.2.1
    0
  • 0.2.0
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i arrow-keys

Weekly Downloads

4

Version

1.0.0

License

none

Last publish

Collaborators

  • raynos
  • mattesch