Open hmake98 opened 4 years ago
Hey, thanks for opening an issue. Could you provide a minimum reproducible example ?
Hey @Djiit, I can share a demo. But, there is a random behavior. and major of this issue we're facing is in windows system.
@Djiit I also found this problem. When I listen to keydown/keyup, sometimes I can't get events. Only in windows os.
In my case, I saw some users's windows will drop events or trigger wrong events. I think all due to the protect software which in user's pc.
Maybe it could help. If electron run on user right, but you make active an application's window with admin right (right mouse click run as administrator). You couldn't get events.
I think i had found the reason! libuiohook listen a event names EVENT_OBJECT_NAMECHANGE
on windows. when the event is triggered, libuiohook will unhook all listener and rehook it.
when the event emited after unhook and before rehook, it will lost!
I am try to remove the code of SetWinEventHook
on EVENT_OBJECT_NAMECHANGE
. it looks good!
I found the commit of this changed on it: https://github.com/kwhat/libuiohook/pull/14
Is it currently an issue or was it fixed? Is it something that was resolved upstream?
@ash0x0 Yes, It's still coming up in the windows system.
@ash0x0 Yes, It's still coming up in the windows system.
Is there a pattern to this that you noticed or is it completely random? I haven't been able to repro, does it happen after some time or right away? With certain applications or after certain events?
@ash0x0 It's completely random. It's most probably occurs when the app is freshly installed into the system.
I had fixed this bug on my repo. But it is a temporary modification because only remove the logic of SetWinEventHook. I think it's a better way to do a configuration. But I am not familiar with this. If you know how to do, please tell me.
https://github.com/TLeaves/iohook/commit/226ce6c27243337075050002b641c13232077d96
Iohook stopped in windows platform.
The scenario in detail: Iohook is supported with electron js environment. But somehow It's not working in windows platform with the use of electron js. It's dropping events sometimes with random behavior. I tried to install VC_redistx64.exe. But, It'll fix the issue for a temporary basis.
Here's my environment detail: