Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 726 Bytes
#NoEnv
SendMode Input
; Disable default CapsLock functionality
SetCapsLockState, AlwaysOff
; Post Esc if pressed alone
CapsLock::
; If you want to override CapsLock functionality for specific windows, etc.
; Just define an OverrideCapsLock() function where you #include this script!
OverrideFunction := "OverrideCapsLock"
; Call the function dynamically to allow for silent failure.
if (Overridden := %OverrideFunction%()) {
Send {%Overridden%}
return
}
KeyWait, CapsLock
if (A_PriorKey="CapsLock")
Send {Esc}
return
; Map CapsLock modified hjkl movement
#If, GetKeyState("CapsLock", "P")
h::Left
j::Down
k::Up
l::Right
#If