Last active
August 1, 2017 12:40
-
-
Save matthayter/dabd88acacb7efa91ef460e0d4289c2d to your computer and use it in GitHub Desktop.
Autohotkey: Use Caps Lock as both CTRL and Escape: Hold for CTRL; tap for Escape.
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
SetCapsLockState Off | |
*CapsLock:: | |
key= | |
Input, key, B C L1 T1, {Esc} | |
if (ErrorLevel = "Max") | |
if key { | |
Send {Ctrl Down} | |
Send {Blind}%key% | |
} | |
KeyWait, CapsLock | |
Return | |
*CapsLock up:: | |
Send {Ctrl Up} | |
if not key { | |
if (A_TimeSincePriorHotkey < 1000) | |
Send, {Esc 2} | |
} | |
key= | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment