I tried to build some automation around streaming with OBS and Starcraft 2 using keyboard. I have added a hotkey using
keyboard.add_hotkey().
While my Python program is running, the game Starcraft 2 lags/stutters when keys are being pressed. It looks like there is a small stutter about every ~3 seconds. I tried replacing keyboard.wait() with my own threading.Event wait() / set() and still registering the hotkey causes the same problem.
If no keys are being pressed, no stutter is noticable. If I spam keys then every ~3 seconds there is a stutter in the game.
I realize something like capturing keys can be difficult to make work together with games, but maybe thre is a simple fix or something I could do different to work around the problem?
I tried to build some automation around streaming with OBS and Starcraft 2 using keyboard. I have added a hotkey using
keyboard.add_hotkey()
.While my Python program is running, the game Starcraft 2 lags/stutters when keys are being pressed. It looks like there is a small stutter about every ~3 seconds. I tried replacing keyboard.wait() with my own threading.Event wait() / set() and still registering the hotkey causes the same problem.
If no keys are being pressed, no stutter is noticable. If I spam keys then every ~3 seconds there is a stutter in the game.
I realize something like capturing keys can be difficult to make work together with games, but maybe thre is a simple fix or something I could do different to work around the problem?