Skip to content

Instantly share code, notes, and snippets.

@Beefster09
Created January 11, 2019 03:40
Show Gist options
  • Save Beefster09/9ffd42ecbd7dc5797f811586585a1162 to your computer and use it in GitHub Desktop.
Save Beefster09/9ffd42ecbd7dc5797f811586585a1162 to your computer and use it in GitHub Desktop.
Autohotkey CapsLock goodness
SetCapsLockState, AlwaysOff
SetScrollLockState
SetNumLockState, AlwaysOn
CapsLock::Send, {blind}{Escape}
CapsLock & j::Send, {blind}{Left}
CapsLock & k::Send, {blind}{Down}
CapsLock & l::Send, {blind}{Right}
CapsLock & i::Send, {blind}{Up}
CapsLock & u::Send, {Blind}^{Left}
CapsLock & o::Send, {Blind}^{Right}
CapsLock & y::Send, {Blind}^{Up}
CapsLock & h::Send, {Blind}^{Down}
CapsLock & s::Send, {blind}{Home}
CapsLock & f::Send, {blind}{End}
CapsLock & e::Send, {blind}{PgUp}
CapsLock & d::Send, {blind}{PgDn}
CapsLock & q::Send, {Blind}^{Home}
CapsLock & a::Send, {Blind}^{End}
CapsLock & `;::Send, {Blind}{Del}
CapsLock & '::Send, {Blind}^{Del}
caps_lock_state := 0
CapsLock & Space::
caps_lock_state := !caps_lock_state
If caps_lock_state
SetCapsLockState, AlwaysOn
Else
SetCapsLockState, AlwaysOff
return
; Enable normal arrow keys only when Scroll lock is on
#^Left::#^Left
#^Right::#^Right
*Left::
If GetKeyState("ScrollLock", "T")
Send, {Blind}{Left}
return
*Right::
If GetKeyState("ScrollLock", "T")
Send, {Blind}{Right}
return
*Up::
If GetKeyState("ScrollLock", "T")
Send, {Blind}{Up}
return
*Down::
If GetKeyState("ScrollLock", "T")
Send, {Blind}{Down}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment