In the following script,when I press the CapsLock and Alt keys and then the J key,"is work" message will not pop up. Only by simultaneously pressing the CapsLock, Alt, and J keys and immediately releasing the keys will "it work" message pop up.
CapsLock & J::
if GetKeyState("Alt","p"){
MsgBox is work
}
return
Change the key J to K, as follows:
CapsLock & K::
if GetKeyState("Alt","p"){
MsgBox is work
}
return
This allows you to press the CapsLock and Alt keys first and then the K key to pop up the "it work" message. I tried other keys, such as A, S, D, F, H, and so on.But you can't change it to G. Only three keys can be pressed at the same time and immediately release the normal output "is work"
I don't understand why?
When custom key combinations use GetKeyState, what is the order in which the keys are executed?