Skip to content

Instantly share code, notes, and snippets.

@jccode
Last active May 10, 2022 13:35
Show Gist options
  • Save jccode/201abfcb749c858e8404ee759cdc4e80 to your computer and use it in GitHub Desktop.
Save jccode/201abfcb749c858e8404ee759cdc4e80 to your computer and use it in GitHub Desktop.
Use CapsLock key to simulate emacs key binding.
;
; CapsLock control movement like emacs keybinding.
;
; Go to begin of line
CapsLock & a::
Send, {Home}
return
; Go to end of line
CapsLock & e::
Send, {End}
return
; Forward char
CapsLock & f::
Send, {Right}
return
; Backward char
CapsLock & b::
Send, {Left}
return
; Next line
CapsLock & n::
Send, {Down}
return
; Previous line
CapsLock & p::
Send, {Up}
return
; Page down
CapsLock & v::
Send, {PgDn}
return
; Page up
CapsLock & c::
Send, {PgUp}
return
; Home
CapsLock & u::
Send, {Home}
return
; End
CapsLock & m::
Send, {End}
return
; Delete
CapsLock & d::
Send, {Del}
return
; Kill line
CapsLock & k::
Send, {ShiftDown}{END}{SHIFTUP}
Send, ^x
return
; Arrows
CapsLock & i::
Send, {Up}
return
;CapsLock & k::
;Send, {Down}
;return
CapsLock & j::
Send, {Left}
return
CapsLock & l::
Send, {Right}
return
; Go to end of page. Alt & CapsLock & .
#if GetKeyState("Alt", "P")
CapsLock & SC034:: Send, ^{End}
return
; Go to begin of page. Alt & CapsLock & ,
#if GetKeyState("Alt", "P")
CapsLock & SC033:: Send, ^{Home}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment