Created
August 9, 2022 19:59
-
-
Save BosEriko/ff2c2543900c3764d2d4985d031e1179 to your computer and use it in GitHub Desktop.
Overload Capslock
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
; Map Capslock to Control | |
; Map press & release of Capslock with no other key to Esc | |
; Press both shift keys together to toggle Capslock | |
*Capslock:: | |
Send {Blind}{LControl down} | |
return | |
*Capslock up:: | |
Send {Blind}{LControl up} | |
; Tooltip, %A_PRIORKEY% | |
; SetTimer, RemoveTooltip, 1000 | |
if A_PRIORKEY = CapsLock | |
{ | |
Send {Esc} | |
} | |
return | |
RemoveTooltip(){ | |
SetTimer, RemoveTooltip, Off | |
Tooltip | |
return | |
} | |
ToggleCaps(){ | |
; this is needed because by default, AHK turns CapsLock off before doing Send | |
SetStoreCapsLockMode, Off | |
Send {CapsLock} | |
SetStoreCapsLockMode, On | |
return | |
} | |
LShift & RShift::ToggleCaps() | |
RShift & LShift::ToggleCaps() | |
; ^!r::Reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment