Edit: I just found this actually has nothing to do with Hotkey command. The script with no Hotkey command also has the unexpected behaviour.
Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
#InstallKeybdHook
#UseHook On
LShift Up::return
z Up::return
A0 02A s d 8.13 LShift
A0 02A h u 0.16 LShift
5A 02C s d 0.48 z
5A 02C h u 0.14 z
Run the script, put cursor in key logger textbox, press and release LShift or z for the first time. No z key event logged but an LShift keyup event is logged. This LShift keyup event is not expected going by the documentation or KeyHistory. I verified this with both key loggers linked below. This problem also applies to LAlt LCtrl LWin so maybe the bug is related to modifier keys?
https w3c.github.io /uievents/tools/key-event-viewer.html
https unixpapa.com /js/testkey.html
Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
#InstallKeybdHook
#UseHook On
LShift::return
LShift Up::return
z::return
z Up::return
I have been using ahk since 2018 but this is my first post. Thank you for bringing such a great tool.