Code: Select all
#SingleInstance, Force
CapsLock::
SetKeyDelay 0
SetMouseDelay 0
MouseClick, left,,, 1, 0, D
Loop {
Sleep, 5
if !GetKeyState("CapsLock", "P")
break
}
MouseClick, left,,, 1, 0, U
14 03A d 0.31 CapsLock
14 03A d 0.26 CapsLock
14 03A d 0.03 CapsLock
14 03A d 0.03 CapsLock
14 03A d 0.03 CapsLock
14 03A d 0.03 CapsLock
14 03A u 0.03 CapsLock
74 03F d 0.19 F5
74 03F u 0.14 F5
33 004 d 0.94 3
33 004 d 0.25 3
33 004 d 0.03 3
33 004 d 0.03 3
33 004 d 0.03 3
33 004 u 0.01 3
I started researching and found out that GetKeyState now always returns 0. Although for any other key everything works fine.
Code: Select all
#SingleInstance, Force
CapsLock::
3::
text := GetKeyState(A_ThisHotkey, "P") . " " . GetKeyState(A_ThisHotkey) . " """ . A_ThisHotkey . """"
OutputDebug % text
return
0 0 "CapsLock"
For "3":
0 1 "3"
I can’t yet understand what happened and how to fix it.