Awesome
flyd-keyboard
Keyboard as Flyd streams.
API
arrows()
var arrows$ = kb.arrows();
arrows$(); // { x: 0, y: 0 }
arrows$ // emits values as arrows are pressed
key()
var enter$ = kb.key('enter');
enter$(); // false
enter$ // emits true or false depending on if enter is held or not
presses()
Emits ASCII codes of pressed keys.
var presses$ = kb.presses();
keysDown()
Emits a list of keys as keycodes that are currently held down.
var keysDown$ = kb.keysDown();
keyDowns()
Emits keydown events as keycodes.
var keyDowns = kb.keyDowns();