Get keyup and keydown on Linux
Natively, node.js only gives you the 'keypress' event. It doesn't give you 'keyup' and 'keydown' events.
An alternative, if you are running a Linux desktop, is to parse the output of the xev
command, which opens up a window and outputs all the X events that happen inside.
That's what this does.
Usage
Installation
npm install xev-emitter
// example.jsconst xevEmitter = processstdinxevEmitter xevEmitter
$ xev | node example.jsh was pressedh was releasede was pressede was releasedl was pressedl was releasedl was pressedl was releasedo was pressedo was released