Created
March 7, 2024 10:25
-
-
Save gpadd/d7bf280c31410df1ef8b6412f3db0d5a to your computer and use it in GitHub Desktop.
Remap CAPS to be either CTRL or ESC depending on if you are holding it down or not. Tweaked For AutoHotkey v2. Original from https://superuser.com/a/581988
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires AutoHotkey v2.0 | |
*CapsLock:: | |
{ | |
Send "{Blind}{Ctrl Down}" | |
global cDown := A_TickCount | |
} | |
*CapsLock up:: | |
{ | |
; Modify the threshold time (in milliseconds) as necessary | |
If ((A_TickCount-cDown) < 150) | |
Send "{Blind}{Ctrl Up}{Esc}" | |
Else | |
Send "{Blind}{Ctrl Up}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment