Skip to content

Instantly share code, notes, and snippets.

@hehuan2112
Last active August 17, 2022 16:05
Show Gist options
  • Save hehuan2112/6e02e44a13923983ed75cdc83228696e to your computer and use it in GitHub Desktop.
Save hehuan2112/6e02e44a13923983ed75cdc83228696e to your computer and use it in GitHub Desktop.
Use Caps+HJKL keys to move cursor with AutoHotKey
SetCapsLockState, AlwaysOff
CapsLock & k::
send, {Up}
Return
CapsLock & j::
send, {Down}
Return
CapsLock & h::
send, {Left}
Return
CapsLock & l::
send, {Right}
Return
CapsLock & m::
send, {Home}
Return
CapsLock & `;::
send, {End}
Return
CapsLock & u::
send, {PgUp}
Return
CapsLock & n::
send, {PgDn}
Return
; This is not hjkl mapping, just for ctrl+space -> win+space to switch input method
; to ensure same shortcut on both my Windows and Mac laptops.
LCtrl & Space::
send, {LWin down}{Space down}
KeyWait, LWin
Send {Space up}{LWin up}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment