To get the build to progress using C++17, instead use this build command:
CXXFLAGS="--std=c++17" node build.js --runtime electron --version 11.1.0 --abi 85 --upload=false
See more: https://wilix-team.github.io/iohook/manual-build.html#macos
First off, to get things working on arm64, had to update build.js as per: nodejs/node-gyp#2673 (comment)
Next, my node was for some reason running as x64. If you could get it to run as arm64, you could probably just run the build script as above. Personally I couldn't get that working, so instead I overwrote build.js and manually included let arch = 'arm64'
, after which the build seemed to work.
The output will be put into prebuilds
folder. Open up the zip and copy paste the relevant build files over to the node_modules/iohook of your project.
- Make your change
- Commit your change
yarn publish
and bump version numbergit push
and check that the build github action completes succesfully
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.
- Versions >= 0.6.0 support only officially supported platforms versions.
- Versions 0.5.X are the last to support Electron < 4.0.0
- Versions 0.4.X are the last to support for Node < 8.0 and Electron < 2.0.0
iohook provides prebuilt version for a bunch of OSes and platforms.
# On Linux (including WSL) platform, you will need libxkbcommon-x11 installed
sudo apt-get install -y libxkbcommon-x11-0
npm install iohook --save # or yarn add iohook
Q. Does this module require Java ?
A. No, this module doesn't require Java (like jnativehook) or any other runtimes.
Q. Is iohook compatible with Node/Electron version X.Y.Z ?
A. We try to match the currently supported version of both Node and Electron.
Are you using iohook in your project ? Please tell us in a PR so we an add it to the list !
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)
- anoadragon453 (electron 4+ support)
- ykhwong (node-gyp usage, electron 9+ support)
- All the other contributors. Feel free to extend this list !