capslayer.ahk
; Source: https://www.autohotkey.com/boards/viewtopic.php?p=131059#p131059 | |
CapsLock:: | |
; KeyWait, CapsLock ; wait for Capslock to be released | |
; KeyWait, CapsLock, D T0.2 ; and pressed again within 0.2 seconds | |
; if ErrorLevel | |
; return | |
; else if (A_PriorKey = "CapsLock") | |
; SetCapsLockState, % GetKeyState("CapsLock","T") ? "Off" : "On" | |
return | |
*CapsLock::return ; This forces capslock into a modifying key. | |
#If, GetKeyState("CapsLock", "P") ; Your CapsLock hotkeys go below | |
; Caps + ; -> Backspace | |
`;::Send {Backspace} | |
; Caps + ' -> Delete | |
'::Send {Delete} | |
; Caps + Space -> Enter | |
Space::Send {Enter} | |
; Caps + i -> Up arrow | |
i::Up | |
; Caps + j -> Left arrow | |
j::Left | |
; Caps + k -> Down arrow | |
k::Down | |
; Caps + l -> Right arrow | |
l::Right | |
; Caps + u -> Home | |
u::Home | |
; Caps + Alt + u -> Shift + Home | |
!u::Send +{Home} | |
; Caps + o -> End | |
o::End | |
; Caps + Alt + o -> Shift + End | |
!o::Send +{End} | |
; Caps + s -> Scroll up (mouse wheel) | |
s::Click, WheelUp | |
; Caps + d -> Scroll down (mouse wheel) | |
d::Click, WheelDown | |
; Caps + - -> "->" | |
-::Send -> | |
; Caps + 9 -> ( | |
9::SendRaw ( | |
; Caps + 0 -> ) | |
0::SendRaw ) | |
; Caps + [ -> { | |
[::SendRaw { | |
; Caps + ] -> } | |
]::SendRaw } | |
; Caps + Alt + ; -> Ctrl + BackSpace | |
!;::Send ^{Backspace} | |
; Caps + Alt + j -> Ctrl + Left arrow | |
!j::Send ^{Left} | |
; Caps + Alt + l -> Ctrl + Right arrow | |
!l::Send ^{Right} | |
; Caps + r -> reload script | |
r:: | |
SoundBeep | |
SoundBeep | |
Reload | |
return | |
; Caps + g -> F13 | |
g::Send {F13} | |
; Caps + e -> F14 | |
e::Send {F14} | |
#If | |
; Disable macro keys | |
;Up::return | |
;Down::return | |
;Left::return | |
;Right::return | |
Home::return | |
End::return | |
; Some other stuff | |
#e::Run c:\totalcmd\TOTALCMD64.EXE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment