Listening to keyboard outside node JS terminal

38 Views Asked by At

I want to make a small game with node js inside the terminal but I need to listen to the keys pressed by the user. I need to make it listen also when the user isn't focusing on the node terminal.

I saw the iohook module but it seems to be old and I can't even install it, I get that error (I think the module isn't maintained anymore):

Downloading prebuild.tar.gz
npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v93-darwin-arm64.tar.gz returned 404

Can someone help me? Thanks.

0

There are 0 best solutions below