9

I'm using vim, so I've remapped caps lock to Esc key. But sometimes I still need caps lock to type long upper case characters. So I'm wondering whether it's possible to remap quick double Shift keystrokes to caps lock?

Please kindly consider Windows and Mac OS X platform.

1 Answers1

0

You could use AutoHotkey for Windows environments.

This will toggle Caps Lock if Shift is pressed twice within 500 milliseconds

Shift::
if (A_ThisHotkey == A_PriorHotkey && A_TimeSincePriorHotkey <= 500)
{
    SetCapsLockState % !GetKeyState("CapsLock", "T")
}
return