I read Cursor keys belong at the center of your keyboard which talks about the benefits of using the cursor keys without moving your hand to the arrows and how it can be done using CAPSLOCK and AutoHotkey. I added some useful commands that I find myself doing when programming. I was wanting to use the numbers to repeat commands for a while like in vim but didn't add them until I read this forum which also helped redesign the script to be simpler (using if GetKeyState
instead of CapsLock &
on each command). I've been using this for almost a year at work as a software developer and it's been fantastic. Unlike vim, I can use the commands anywhere that the keyboard can be used, without plugins, even in remote desktop. Change the keys in the script to find the combination you like the best.
0-9 one or more times then command to repeat a command
- j - left
- k - down
- l - right
- i - up
- o - page up
- p - page down
- h - Home (not repeatable)
- u - End (not repeatable)
- y - delete
- m - delete line (Home, Shift+Down, Delete)
- n - newline (End, Enter)
- z - undo
- Shift+z - redo
- x - cut (Ctrl+x)
- c - copy (Ctrl+c)
- v - paste (Ctrl+v)
- a - select all (Ctrl+a)
- s - save (Ctrl+s)