QR Code contains TinyURL of this article.THE MAGICAL CAPS LOCK KEY

Stylised rendering of a caps lock key with its LED illuminated


The caps lock key is one of the most useful keys on my keyboard. I use the powerful Karabiner Elements software to empower the key with practical and time-saving functionality.

The Most Hated Key

There is a sizeable contingent of computer users who really dislike the caps lock key. This is understandable. This unjustly forsaken key commonly sits just to the left of the A key on a QWERTY keyboard. A is one of the most frequently hit keys for English writers. Thus one can appreciate that caps lock is often inadvertently triggered. This results in strings of uppercase characters, which the Internet interprets as SHOUTING, something that it frowns upon and which is generally considered to be poor form.

The caps lock key is a mode-switch toggle. You hit it and it puts the keyboard into uppercase mode, hit it again and turns off the uppercase mode. Did you ever wonder why the caps lock key has an LED on it? The LED is there because computer/keyboard manufacturers know how frustrating it is to type for a while, only to discover that you have inadvertently enabled caps-lock.

retro mechanical typewriter

Some of my readers, if they are of my generation, will have vague memories of the mechanical typewriters of old. On such a machine, in order to enable caps-lock, one would depress the shift key, then the caps lock key to lock the shift operation. One would then depress the caps lock key again to release the lock. This was elegant and, well, logical. It made sense. Sadly, computer keyboards never operated this way (at least, none that I know of). If they did, then the average user might look more favourably on, or least be neutral towards caps lock.

A Basic Fix

Computer users sometimes go to extraordinary lengths to change the behaviour of their caps lock key. It is not uncommon to see this key remapped to control or escape, or even disabled entirely (some users take the nuclear option: physically removing the key or cutting its tracks on the keyboard PCB). Generally, one can remap the key in software. In macOS, for example, one can use the keyboard preference pane to remap caps lock to control, option, command or esc. Or one can choose “No Action” to disable the key entirely.

remapping options for the caps-lock key in MacOS Sierra

That’s all well and good. But suppose we want to go further than a basic remap…

Going to the Next Level

Back in 2015 — in an article entitled, “Keyboard Wizard” — I wrote about how I used a software combination of Seil and Karabiner to turn my caps lock key into a so-called hyper key modifier. This opened up a whole keyboard worth of new, configurable, non-conflicting keyboard shortcuts to me and became an invaluable component of my computing.

Then Apple released the macOS Sierra operating system. Unfortunately this broke the APIs or hooks that Karabiner used, effectively removing all of my (by now committed to muscle memory) bespoke keyboard shortcuts. It was a dark time indeed.

The changes introduced by Sierra were so wide in scope that Karabiner was effectively deprecated. The author, Takayama Fumihiko, started over with the entirely new Karabiner Elements. But, for the longest time, Elements supported only simple one-to-one key remapping. The multi-key modifier I had come to rely on was simply unavailable. I’d learn of the odd hack that would restore some of the functionality, but nothing came close to the configuration I’d come to know and love. Then a fork of Elements appeared which restored at least the hyper key functionality. Things were getting better.

Recently, Fumihiko released a new revision of Elements, featuring full support for complex modifications at last, and restoring equilibrium to my computing in the process.

Note: Don’t let the term “complex modifications” put you off, complex in this context simply means not a one-to-one key remap.

Ultimate Caps-lock

So, with all of that background out the way, let me tell you how my caps lock key behaves now:

  1. When depressed on its own it maps to esc (useful on my Touch Bar MacBook);
  2. When used as modifier (depressed in conjunction with another key) it acts as a hyper key;
  3. When depressed in conjunction with the shift key (either left or right) it toggles the caps lock mode.

For myself, this is the perfect set-up. The caps lock key has gone from being the most irritating key on the keyboard, to being the perfect companion to my life as a keyboard jockey.

You should give Karabiner Elements a try. If you’d like to use the configuration I have described here, my karabiner.json file is a available as a Gist.