Subscribe handlers to keyboard shortcuts
npm install shortcutkeypress events process.stdin.setRawMode(true)
process.stdin.resume()
shortcut('ctrl+c', process.exit)
shortcut('alt+a, shift+a, ctrl+a', function() { console.log('awesome') })
shortcut('meta+q', console.log.bind(null, 'queue', '...so meta'))
Modifiers joined by + and terminated with, to assign multiple tofn(event, handler): fn will be called with the keypress event and the handler
shift: ⇧, shiftctrl: ^, ctrl, controlmeta: ⌥, meta, alt, option