Code: Select all
~$RShift::
KeyWait, RShift
If (A_ThisHotkey = A_PriorHotkey) && (A_TimeSincePriorHotkey < 400)
SetCapsLockState, % ((GetKeyState("CapsLock", "T") = 1) ? "Off" : "On")
Return
But this hotkey has a problem: when CL is activated, and I press the Shift key (any), it goes off.
My goal: I would like to have a hotkey that activate CapsLock by double tapping the Shift key, but when I press down the Shift key—to use an accent or punctuation, or even a lowercase character—the CL still keeps on.
Can you help me?