Skip to content

Instantly share code, notes, and snippets.

@8
Created February 16, 2020 23:28
Show Gist options
  • Save 8/37c4482c80511142dcd49427307ed945 to your computer and use it in GitHub Desktop.
Save 8/37c4482c80511142dcd49427307ed945 to your computer and use it in GitHub Desktop.
; Disables Capslock
SetCapsLockState, AlwaysOff
; Allows navigation using capslock + IJKL while keeping other modifiers intact like shift and ctrl
Capslock & I::Send {Blind}{Up}
Capslock & K::Send {Blind}{Down}
; Capslock & J::Send {Blind}{Left}
; Capslock & L::Send {Blind}{Right}
; Capslock & F should not do anything
Capslock & F::
return
; if Capslock + j => Move left
; if Capslock + j + f => Move Word left
Capslock & J::
if (GetKeyState("F", "P")) {
Send ^{Left}
} else {
Send {Left}
}
Return
; if Capslock + j => Move right
; if Capslock + j + f => Move Word right
Capslock & L::
if (GetKeyState("F", "P")) {
Send ^{Right}
} else {
Send {Right}
}
Return
; start of line / end of line
Capslock & H::Send {Blind}{Home}
Capslock & Ö::Send {Blind}{End}
;Capslock & Ü::Send {Blind}{PgUp}
;Capslock & Ä::Send {Blind}{PgDn}
Capslock & U::Send {Blind}{Backspace}
Capslock & O::Send {Blind}{Del}
; #IfWinActive, ahk_class Vim
; Capslock::Send {Esc}
; active windows terminal on ctrl-ö
Ctrl & ö::
WinActivate, ahk_class CASCADIA_HOSTING_WINDOW_CLASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment