-
Notifications
You must be signed in to change notification settings - Fork 291
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 when more than one app use iohook #93
Comments
Same here! 😞 |
Same here too!
|
sorry, but my problem is not two electron applications repeated. My problem is two or more different electron applications |
What you could do is, e.g. write a file somewhere in the user folder and check if it is present before launching the app. |
@Djiit |
I am getting the same problem with two nodejs applications, where if the first one has an ioHook module loaded, the second one that opens with an ioHook module loaded lags a lot and causes the cursor and other IO inputs to lag out until the second application is closed. |
I got it now. Maybe we could tell iohook to only listen once system-wide, and provide a way for users to know it (like triggering an event "IOHookAlreadyListening". Any C++ programmer here ? |
When launching two or more processes with iohook module, my mouse moves like in slow-mo. This is actually a big problem. Imagine if user launches two or more completely different apps that uses iohook module. Test code:
|
I am not a c++ programmer, and I am not sure what I did here. But this fixes issue wilix-team#93.
@Djiit , this issue hasn't been resolved by now? I have to give up iohook because of this issue. |
This issue: #176 seems related to this one. Similar mouse slo-mo problem. |
@Lennon925 Did you find an alternative for iohook? |
Acturally not yet. But I am using "robotjs" which can monitor mouse event only. |
As this is still not fixed, I'm switching over to something that seems to work much better: |
Hey, we just ran into this exact issue (wasn't aware that it was caused by iohook but luckily ran into this thread). Is there any way to simply detect if there's another instance of iohook and shut down iohook functionality in our app? |
I'm not aware of that, but I strongly advise against using iohook in any way before this issue is fixed somewhere. Gkm it turns out has quite some issues too. Next I'll look into if I can use Electron.js to be able to respond to global keys. |
Got it, yeah we've come to the same conclusion but unfortunately, we haven't found a good alternative. We've experimented with the |
Is that so? That's strange. I've still yet to experiment with the Electron approach, would be a shame if they couldn't react to a shortcut key that another app is also listening to. Have you perhaps a small reproducible experimental example that I could also try to replicate this? Because if so, their project might be much more active, receptive and interested in fixing this shortcoming of theirs, and we could share it with them too while raising an issue with them. |
It looks like libuiohook has fixed this issue upstream somewhat recently: kwhat/libuiohook#72 I've yet to try dropping this newer libuiohook version in, but it certainly feels promising. |
Put out a PR for a fix for this. Welcoming reviews here: #294 |
Following. I have the same issue |
Current Behavior
whenever I open more than one electron application using iohook, it makes the whole operating system freeze for a few seconds.
Steps to Reproduce (for bugs)
Context
I want to use the module in more than one project, but I do not want this type of problem to happen.
Your Environment
The text was updated successfully, but these errors were encountered: