Simple keyboard input for use in a game loop.
$ npm install --save keyboard-input
import KeyboardInput from 'keyboard-input';
import { ESC } from '@vaalentin/keycodes';
const keyboard = new KeyboardInput();
// then later
if(keyboard.isPressed(ESC)) {
// esc is pressed
}
MIT, see LICENSE.md for more details.