I’m trying to use this package (or any method) https://www.npmjs.com/package/input-event to read key events using Node.
I use this example code:
const InputEvent = require('input-event');
const input = new InputEvent('/dev/input/event0');
const keyboard = new InputEvent.Keyboard(input);
keyboard.on('keyup' , console.log);
keyboard.on('keydown' , console.log);
keyboard.on('keypress', console.log);
But I see no output.