Created
December 2, 2021 16:54
-
-
Save theothermattm/715ff8652e2a936e467536ffc3d8fe6a to your computer and use it in GitHub Desktop.
Windows AutoHotKey Remap CAPSLOCK+HJKL to Vim Movement Keys
This file contains hidden or 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
; Main Navigation | |
CAPSLOCK & j::MoveCursor("{DOWN}") | |
CAPSLOCK & l::MoveCursor("{RIGHT}") | |
CAPSLOCK & k::MoveCursor("{UP}") | |
CAPSLOCK & h::MoveCursor("{LEFT}") | |
; Navigation Combos | |
MoveCursor(key) { | |
shift := GetKeyState("SHIFT","P") | |
control := GetKeyState("CONTROL","P") | |
controlShift := control && shift | |
if controlShift { | |
Send, ^+%key% | |
} | |
else if shift { | |
Send, +%key% | |
} | |
else if control { | |
Send, ^%key% | |
} | |
else { | |
Send, %key% | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment