Code: Select all
CapsLock::
If (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200) {
SetCapsLockState % !GetKeyState("CapsLock", "T")
} else { ; needs tweak, now it will be triggered on double press
Send, ^#{Space}
}
Return
What I am expecting is for single pressing CapsLock, send ctrl + win + space instead, for double pressing, change CapsLock state.