-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freezes after one key, mouse Input #23
Comments
Having the same issue with version 1.5.0, intel Mac. OSX version 11.6.8. The on keydown callback is only called once. |
After I click somewhere on my mouse, the mousemove event stops |
Same issue on intel Mac |
Same issue with M1 Mac (macOS 13.3.1) |
Same issue with intel mac 13.4.1 (22F82), node v16.20.0 |
I know this is in go, but I found that this project works on mac if anyone is interested. |
Using uiohook-napi on Mac in an Electron renderer process for a while now and I never ran into this issue until now after updating my Electron version. Using Electron >=25 brings the issue. Using Electron <=24 avoids it. M1 Mac running macOS 14. Bug does not occur if using uiohook-napi in the main process only in renderer. Edit: Also observed on an older Intel Mac running macOS 12 and again, only if using Electron 25+. |
I have the same issue on macOS 14, even without Electron. So i tried to debug for a bit, and it seems the error occurs on this line in libuiohook: https://github.com/kwhat/libuiohook/blob/1.2/src/darwin/input_hook.c#L280 (for keyboard key presses) If i comment out this line it works on macOS 14. The interesting thing is, that when i run the libuiohook C demo it works on macos without any changes. So maybe the difference is that in node it is not running in the main loop? But i'm not really sure how the C lib is working internally. Maybe this can be of help to further analyze the issue. |
The freezing issue occurs due to a deadlock caused by the The call graph is as follows:
|
In the simplest form of
`const { uIOhook, UiohookKey } = require("uiohook-napi");
uIOhook.on("keydown", (e) => {
if (e.keycode === UiohookKey.Q) {
console.log("Hello!");
}
if (e.keycode === UiohookKey.Escape) {
process.exit(0);
}
});
uIOhook.start();
`
The application lib is still running but after getting one key and outputting "hello" it stops working without an error message.
Mac OS ARM 12.5.1 strangely two months ago it worked without any problems but tested now back to version 1.3 and it still doesn't work. Not sure how to debug this since no output or sigterm but will try to look if I find something and close the ticket if it is only a problem occurring on my device
The text was updated successfully, but these errors were encountered: