Last active
November 12, 2020 09:07
-
-
Save LazyRen/5734759a0892b8dd041f2fb6f155efa3 to your computer and use it in GitHub Desktop.
vim like arrows & move functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;############################################### | |
;Disable CapsLock | |
;############################################### | |
CapsLock:: | |
SetCapslockState, Alwaysoff | |
return | |
;############################################### | |
;Control + CapsLock -> CapsLock | |
;############################################### | |
Control & CapsLock:: | |
GetKeyState, cstate, capslock, T | |
if cstate = U | |
SetCapslockState, On | |
if cstate = D | |
SetCapslockState, Off | |
return | |
;############################################### | |
;CapsLock + h -> left | |
;CapsLock + j -> down | |
;CapsLock + k -> up | |
;CapsLock + l -> right | |
;CapsLock + n -> home | |
;CapsLock + m -> end | |
;CapsLock + , -> PgDn | |
;CapsLock + . -> PgUp | |
;############################################### | |
$*H:: | |
if GetKeyState("Capslock", "P") | |
sendInput {left} | |
else | |
sendInput {h} | |
return | |
$*J:: | |
if GetKeyState("Capslock", "P") | |
sendInput {down} | |
else | |
sendInput {j} | |
return | |
$*K:: | |
if GetKeyState("Capslock", "P") | |
sendInput {up} | |
else | |
sendInput {k} | |
return | |
$*L:: | |
if GetKeyState("Capslock", "P") | |
sendInput {right} | |
else | |
sendInput {l} | |
return | |
$*N:: | |
if GetKeyState("Capslock", "P") | |
sendInput {Home} | |
else | |
sendInput {n} | |
return | |
$*M:: | |
if GetKeyState("Capslock", "P") | |
sendInput {End} | |
else | |
sendInput {m} | |
return | |
$*,:: | |
if GetKeyState("Capslock", "P") | |
sendInput {PgDn} | |
else | |
sendInput {,} | |
return | |
$*.:: | |
if GetKeyState("Capslock", "P") | |
sendInput {PgUp} | |
else | |
sendInput {.} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment