-
Notifications
You must be signed in to change notification settings - Fork 290
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
[OSX high sierra] Key- press/down/up is only called once #124
Comments
I can confirm this with node v8.11.4 (no electron) |
Hi there ! Thanks for your feedback. I can't reproduce this on Mojave. Will try a bit more tomorrow or later this week when I can. |
@Djiit Thanks! Good to know it's working on Mojave at least, it's probably time to update then. |
I'm using only mouse events, but whenever I press a keyboard key, mouse events stop firing. I'm using MacOS High Sierra too. |
me too(in mojave 10.14.1). my log
|
is it fixed? |
I can't reproduce this; and I'm on Mojave. |
I just ran into this issue on a fresh project identical to the example provided and I'm using Mojave. Just running in a raw node app, no electron involved. Node v10.10.0 |
Running in debug mode and found out that it removes all callbacks. I was getting mouse events firing until a key was pressed. So I think this is a problem in the |
Does line 89 need a iohook/libuiohook/src/demo_hook.c Lines 67 to 89 in 8233c8a
|
Hi, i have same issue. After first keydown event callbacks stop calling. I'm on Mojave
Here is debug output
I commented out this line and rebuilt the package. I don't familiar with C, and don't know what this line does, but now all works fine. I hoping this may be helpful |
Hi guys,
These file are part of libuiohook, the lib used by iohook. I suggest you
open an issue there.
Le jeu. 3 janv. 2019 à 18:27, Oleg Kravchenko <notifications@github.com> a
écrit :
… Hi, i have same issue. After first keydown event callbacks stop calling.
I'm on Mojave 10.14.2, node version 10.15.0.
const ioHook = require('iohook');
ioHook.start(true);
Here is debug output
hook_run [1121]: Accessibility API is enabled.
hook_run [1172]: CGEventTapCreate Successful.
hook_run [1178]: CFMachPortCreateRunLoopSource successful.
hook_run [1183]: CFRunLoopGetCurrent successful.
hook_run [1196]: CFRunLoopObserverCreate successful.
dispatch_event [108]: Dispatching event type 1.
hook_enable [257]: Thread Result: (0).
process_key_pressed [367]: Key 0X39 pressed. (0X31)
dispatch_event [108]: Dispatching event type 4.
process_key_pressed [379]: Using dispatch_sync_f for key typed events.
^C
I commented out this line
<https://github.com/wilix-team/iohook/blob/master/libuiohook/src/darwin/input_hook.c#L380>
and rebuilt the package.
I don't familiar with C, and don't know what this line does, but now all
works fine.
I hoping this may be helpful
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHZtKo8fbN0NGzFcUVHI4qMogCji2hUks5u_j2NgaJpZM4YVO8m>
.
|
I also have this problem. I followed LastDreamer's advice and commented-out the offending line. Everything now seems to be working. |
Can you tell me the detail steps to rebuild this? |
Also having this issue on Mac OS X 10.14. |
@LastDreamer - Can you provide your steps? |
@Djiit kwhat/libuiohook#2 looks like they were having the issue, but then solved it Perhaps this was a different issue though |
If it isn't, maybe this module has an outdated version of their code? |
@MulverineX - That thread is from 2014, I doubt iohook's dependency is that old. @Djiit - Can you weight in on this? |
Hi there ! I can confirm we use libuiohook v1.1 so yes, we have this fix |
@Djiit - I'm using 'latest: 0.4.0' for iohook, and this 'fires-once' bug still persists on macOS Mojave. Do you have any recommendations? I would very much like to use this package. |
#124 (comment) this comment of any help/work? |
Just to confirm. Same problem on Mojave here |
Same problem on Mojave here +1 |
on Mojave +1 |
I tried the mentioned workaround but I am somehow not able to compile the build on MacOS 10.14.6 with Node 12.11. Any other hint on the main issue (#124)?
|
This is still an issue on Catalina 10.15 |
+1 on Mojave |
@jsilversun Thanks so much for that fix! I followed all of your steps and I managed to compile iohook from source and got the "iohook.node" compiled library. However, when I run this I get this error:
Any idea why this is happening? |
Why is this not fixed yet? Is the project dead? |
For me the solution was just to compile directly from source directly, not through npm/nodejs or any of that. Just go to https://github.com/kwhat/libuiohook and compile it from source. This nodeJS version is just a wrapper for that one. It's much easier to just compile https://github.com/kwhat/libuiohook directly. After I compiled it from source, not weird bugs have popped in any platform! |
Why would they just not fix the real issue
…On Sat, Apr 25, 2020 at 12:22 PM Lorenzo B Gomez ***@***.***> wrote:
Why is this not fixed yet? Is the project dead?
For me the solution was just to compile directly from source directly, not
through npm/nodejs or any of that. Just go to
https://github.com/kwhat/libuiohook and compile it from source. This
nodeJS version is just a wrapper for that one. It's much easier to just
compile https://github.com/kwhat/libuiohook directly. After I compiled it
from source, not weird bugs have popped in any platform!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKVYN4PYU3TX6FPZ62OSI3ROML4LANCNFSM4GCU54TA>
.
|
Hey Greg. Thanks for your message. You are free (as in free software) to
create a PR with your solution. Any help is greatly appreciated.
…--
Julien
Le sam. 25 avr. 2020 à 20:12, Greg Greenhaw <notifications@github.com> a
écrit :
Why would they just not fix the real issue
On Sat, Apr 25, 2020 at 12:22 PM Lorenzo B Gomez ***@***.***
>
wrote:
> Why is this not fixed yet? Is the project dead?
>
> For me the solution was just to compile directly from source directly,
not
> through npm/nodejs or any of that. Just go to
> https://github.com/kwhat/libuiohook and compile it from source. This
> nodeJS version is just a wrapper for that one. It's much easier to just
> compile https://github.com/kwhat/libuiohook directly. After I compiled
it
> from source, not weird bugs have popped in any platform!
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#124 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAKVYN4PYU3TX6FPZ62OSI3ROML4LANCNFSM4GCU54TA
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI5TNGYURLHL5INZL2LMILROMRYZANCNFSM4GCU54TA>
.
|
In my case, it wasn't just the solution but it was a much better one. But that's just me. I know some people just want to hook it into NodeJS, but for my case a bearbones C solution was actually better. But again, this was in my specific case. I don't know about anyone else's case. For more context, I used it for this https://github.com/thebigG/Tasker |
Even though the way JSilversun provides is useful, there's still hope that this problem can be solved. |
I get to the compiling part, and I get this error:
|
I also have this issue on Mojave. Will try the workaround provided above. thanks. |
Yup #124 (comment) works for me too. Thanks @LastDreamer |
same here and I tried to compile myself but not succeed can anyone help me? |
@jsilversun ./bootstrap.sh: line 7: autoreconf: command not found |
@vamshi-kura I ran into the same issue you did. I had to install some things using brew:
source: kwhat/libuiohook#43 (comment) Before this I installed cmake-js globally: Also I had to install cmake: b As a note, I installed these separately in this order. I don't know if something could go wrong if you install them in a different order or at once. Another note to add is that I had to run node v10.22.1, npm 6.14.6, macOS Catalina version 10.15.5 |
Not sure why this isn't officially fixed. But, just to reiterate:
As mentioned in prior comments, comment out
the last 3 paragraphs here, will tell you where to find and place the newly built package.
|
@LastDreamer @tcardlab followed your instructions but still not seeing fixed behaviour. Can you not just fork this project with the fixed build? |
I am facing same issue on macOS Big Sur 11.1. Keydown/keyup events are called once per app. I tried the suggested fix by commenting line and using the updated iohook.node binary, but still having same issue. Any help would be appreciated. |
never mind, I got it working. Well documented steps by #124 (comment), followed the same but it was not working since I just copied "iohook.node" from iohook node_modules after new build by commenting suggested line. You also need to copy "uiohook.dylib" from the same folder into your ./node_modules/iohook/builds/node-v83-darwin-x64/build/release" folder. And it works. Cheers... |
Is this still an issue with the current version? Someone please indicate so I can get working on this if so. |
@ash0x0, I've updated my project from using iohook 0.7.2 to 0.9.3 today, issue is still happening if I don't apply the workaround. |
Yes, it's still happening. macOS Ventura 13.4 node v14.21.3 |
Expected Behavior
Upon attaching key- press/down/up, the callback should be fired every time these events happen.
Current Behavior
The callback is only fired once
Possible Solution
No clue
Steps to Reproduce (for bugs)
Your Environment
![screen shot 2018-11-08 at 19 25 10](https://user-images.githubusercontent.com/7059091/48219159-127e6500-e38c-11e8-9045-50edc9239b51.png)
NodeJS: 10.11.0The text was updated successfully, but these errors were encountered: