Node.js global native keyboard and mouse listener.
This module can handle keyboard and mouse events via native hooks inside and outside your JavaScript/TypeScript application.
Found a bug? Have an idea? Feel free to post an issue or submit a PR.
Check out the documentation.
iohook provides prebuilt version for a bunch of OSes and runtime versions.
from git
npm i git+https://github.com:wurikiji/iohook.git
- for Node.js usage just make sure that you have installed following components and it will be built by install script
- for Electron go to installation dir (node_modules/iohook) and recompile it according to your Electron version. e.g.
cmake-js rebuild -r electron -v 2.0.0
You can enable keyboard event propagation. Keyboard events are propagated by default.
You can disable keyboard event propagtion. Keyboard events are captured and emitted but not propagated to the apps.
You can enable or disable mouse movement propagtions.
Q. Does this module require Java ?
A. No, this module doesn't require Java (like jnativehook) or any other runtimes.
Thanks to kwhat for the libuiohook project and ayoubserti for the first iohook prototype.
- vespakoen (prebuild system implementation)
- matthewshirley (Windows prebuild fix)
- djiit (project & community help)
- ezain (add feature enable/disable mouse click propagation)
- wurikiji (add features. refer to commit log and readme)
- All the other contributors. Feel free to extend this list !