Autohotkey Control + Capslock issue

588 views Asked by At

I am using Autohotkey to make it so that you have to hit Shift + CapsLock in order to activate capslock. Then just pressing capslock gets you out of capslock. I love this script, however, when I switch tabs in chrome using Control + Tab, I sometimes end up hitting Contorl + Capslock, which activates capslock. Here is my code:

; Only allow capslock if it's shift-capslock
$SC03a::
GetKeyState,caps,CapsLock,T

if caps = D
    SetCapsLockState,Off
return

I don't know how to get around this. Any ideas?

1

There are 1 answers

0
Relax On BEST ANSWER

Only allow capslock if it's shift-capslock:

   CapsLock::SetCapslockState AlwaysOFF
   +CapsLock::SetCapslockState AlwaysON