iohook
iohook copied to clipboard
Fails to hook when OBS Studio is running (using version 0.6.6)
Expected Behavior
Would expect it to work in spite of other programs that have global hotkey functionality.
Current Behavior
If OBS Studio is running when I start the program, the mouse cursor lags severely but no debug messages appear, and my inputs are not registered by IOHook. If I start the program before starting OBS Studio, the same lag appears for a few seconds before returning to normal, IOHook starts normally, and OBS Studio's functionality appears to be unaffected.
One debug messages that comes up very frequently in that case that may be indicative of an underlying issue is win_hook_event_proc [638]: Restarting Windows input hook on window event: 0X800C.
Possible Solution
Not sure. It doesn't seem possible to disable global hotkey functionality in OBS Studio (nor would I necessarily want to, though it would be nice to know if that were a possible solution).
Steps to Reproduce (for bugs)
Only steps I can suggest are to try to start IOHook with OBS Studio already running. Would be curious to know if this happens in Windows environments with more recent versions of Node and IOHook than I'm forced to use currently.
Context
My program is a Twitch chat bot with voice command functionality. I'm using IOHook to capture input from an L3 press on a DS4 controller (which has been remapped in ds4windows to the Ins key that IOHook is listening for).
Your Environment
- IOHook Version: 0.6.6
- Environment name and version: Node v12.13.0
- Operating System and version (desktop or mobile): Windows 10
- From my package.json:
"iohook": { "targets": [ "node-72" ], "platforms": [ "win32" ], "arches": [ "x64", "ia32" ] }
Yeah that was a longstanding Windows iohook bug that was only recently fixed in v.0.9.x. If you try to run any 2 apps simultaneously that use any older version of iohook/libuiohook stuff gets borked like that. I guess OBS is also using some old version of iohook or libuiohook. Only fix is to use the newer fixed iohook. And/or might want to report it to the OBS maintainers to see if they want to fix it on their end. Might be an easy drop-in replacement for them.