iohook
iohook copied to clipboard
Support Electron 15-19 and Node.js 17-18
Support electron-15.0.0 with abi-98.
Tested on Windows 10 x64.
$ electron --version && electron --abi && electron .
v15.0.0
98
{ button: 0, clicks: 0, x: 2534, y: 46, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2528, y: 50, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2522, y: 53, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2516, y: 57, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2512, y: 59, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2508, y: 60, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2506, y: 61, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2504, y: 62, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2502, y: 63, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2499, y: 63, type: 'mousemove' }
{ button: 0, clicks: 0, x: 2496, y: 65, type: 'mousemove' }
@ash0x0 or @ykhwong - any chance we can have this one merged/released soon? I'm currently blocked on upgrading to electron 15 due to iohook not supporting it
Sorry, but I have no permission to merge this pull request. I think that ash0x0 can do it.
@chevonc it works fine if you build manually for electron 15. The only issue is that prebuilds are not provided.
@marcelblum yeah, I realize I can manually build. However, our current dev flow is setup as such to depend on the pre-builds, so would like to keep using them ideally to avoid having to introduce an additional step
@ash0x0 @Djiit any chance we could get this merged soon?
It looks like a solution for really huge problem but @ash0x0 can you merge it?
Yeah, would be cool to get this merged, I tested this on Electron 16 & node 17 on macos Big Sur and it's working fine)) @WilixLead @ash0x0 @Djiit
@ash0x0 Any update on that?
After reading previous comments, how do I manually build?
After reading previous comments, how do I manually build?
Documentation: https://wilix-team.github.io/iohook/manual-build.html
Hi Wilix Team, would it be possible to grant merge and publish access to more folks in the community?
It seems that the project would benefit from more attention as there are many PRs open with little movement. @WilixLead @ash0x0 @Djiit
Is the manual build available now for electron 18? I get errors when I run node build.js --runtime electron --version 18.0.1 --abi 103
Is the manual build available now for electron 18? I get errors when I run
node build.js --runtime electron --version 18.0.1 --abi 103
Clone the pull request branch ykhwong:update-electron-v15 and build using node:
$ git clone https://github.com/ykhwong/iohook --branch=update-electron-v15
$ cd iohook
$ npm i --ignore-scripts
$ node build.js --runtime electron --version 18.0.1 --abi 103 --msvs_version=2022 --upload=false
Just to clarify, are we just waiting on someone with merge credentials?
Just to clarify, are we just waiting on someone with merge credentials?
Yes
Any news?
@ykhwong I've been trying to follow your instructions but I'm about at my wits end. I'm getting "iohook.node is not a valid Win32 application" despite getting a successful build. Any ideas why that might be? I'm building and running on Windows 10.

I've been trying to follow your instructions but I'm about at my wits end. I'm getting "iohook.node is not a valid Win32 application" despite getting a successful build. Any ideas why that might be? I'm building and running on Windows 10.
The instruction that I provide above is only about how to build iohook manually. You also need to copy the "iohook.node" file that you compiled to your project's iohook module directory.
I have no idea why the error message occurs because you didn't provide any steps to reproduce the problem. Not sure if the issue is the same as https://github.com/wilix-team/iohook/issues/402
@ash0x0 merge it
@ykhwong could you publish your branch to npm?
@WilixLead Anyone around to merge this? This package is quickly becoming outdated.
This package is already outdated, You may want to use https://www.npmjs.com/package/uiohook-napi instead
I switched to uiohook-napi but am currently in the process of switching back to iohook. The author of uiohook-napi does not own a mac and is unable to fix a crash (https://github.com/SnosMe/uiohook-napi/issues/24). While I was able to work around this crash, I encountered more issues trying to produce a universal mac build and I am not able to figure it out. So going back to iohook for now unfortunately.
That's unfortunate, thanks for updating this thread 👍
Hi, we're starting to merge PRs again, is this still working and relevant?
@lacymorrow it'd certainly be nice to have, but the Electron and Node versions this PR targeted are now way out of date
Agreed, but we have downstream projects that would benefit from even partial electron and node updates. It's probably worth the bump.
I may not have the ability to release new versions though.
@WilixLead Do you know if I will be able to release new versions on NPM, or update the documentation?
I'm not sure where to put this, but I want to call out this particular fork of libuiohook, which seems to work everywhere (solves macOS 14 not working, for example). It's used within a .NET analog of this package. I've taken a stab at integrating it here, but my C/C++ skills are uh...very lacking. Would integrating this fork help with updating electron and node support?
Why is the package-lock.json change in this PR so massive?