Turning Caps Lock Into an Useful Key

The Caps Lock key is in a very privileged position on any keyboard: In the home row(for the non-touch typing aficionados: the one with a, s, d, f, j, k, l and ; keys, where your fingers should be resting.), close to other modifier keys, and yet, it's default function is kind of useless. I'll share in this post a couple of ideas to turn it from a zero to hero key, starting with Windows first.

Start by downloading AutoHotkey(https://www.autohotkey.com/), which allows you to script key behaviours. You can do a lot of powerful stuff with it but my uses are very niche. Create a new text file with the .ahk extension and this lines inside:

#KeyHistory 0
CapsLock & k::Up
CapsLock & j::Down
CapsLock & h::Left
CapsLock & l::Right
CapsLock & e::Send {Esc}
CapsLock & u::Send {Home}
CapsLock & i::Send {End}
CapsLock & o::Send {PgUp}
CapsLock & p::Send {PgDn}
CapsLock & Backspace::Send {Del} 

Next, paste that file into C:\Users\<YourUser>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Now the script will be active during Windows Startup and you can enjoy your new key functionality. As you can see, I'm emulating the arrow keys with Caps Lock+h,j,k and l to have "System-Wide" basic Vim navigation in any text editor. I also mapped in the row above shortcuts for Home, End, PageUp, PageDown and Del because I use those keys a lot but I have to move my fingers too far from the home row to reach them. This depends on your keyboard size and type as well. In some notebooks you can activate them by using a modifier FN key. I'm attempting to make a more universal solution with this approach.

Last but not least, I also remapped Esc to Caps Lock+e to cancel actions quicker. Note that a great thing about this setup is that when you release Caps Lock it will be toggled off automatically, no need to manually press a second time to disable it.

Now on the Linux world, I admit it's a problem I tackled very recently, so there might be other solutions out there. I personally would like to find a terminal-based solution in the future so I can easily script the behavior when settings up a new machine, but since my current approach is GUI-based it should be very easy to follow and set up.

My example will use Linux Mint, since it will be distribution I will migrate as part of my multi-year plan to reduce my dependence on Windows(more on that on future posts).

Using your software package, install input-remapper. The UI looks like this:

From there the mapping is very straight forward. I'm using the same combinations as the Auto Hotkey setup above.

If you want other options for Caps Lock functionality, Cinnamon has a good range of options. Go to System Settings>Keyboard>Layouts>Options... and under the Caps Lock behavior toggle menu there are a lot of alternatives you can use the key for.

                                                                                                         So many options!

I've seen some 3d artists claiming that remapping Caps Lock to delete yielded great productivy boost, for example. Again, the downside of my current solution is relying on a GUI, which I'm not sure it would be available when using Terminal-only environments. I'll give an update if I can find a solution that addresses those limitations.

See you next mission.

Next
Next

Versioning Your Preferences