We have been having severe mouse and keyboard input issues with hotkeys especially those using `KeyWait`. We found that removing every application-specific `#If` from the code minimises if not eliminates the issue.
After further debugging, we determined the direct cause to be MouseHook. When adding `#InstallMouseHook` (or a hotkey which calls for it) to our simple test script below, we can replicate the problem instantly:
Code: Select all
#If WinActive("ahk_exe status.exe")
j::
Send, {j}
KeyWait, j
Send, {j}
Return
Compiling the code using Compile_AHK rather than the default compiler also minimises (but not eliminates) the issue. Running the script bare does work fine, but it would require deploying AutoHotkey to endpoints which is undesirable.