Supercharge Your Caps Lock: Remapping with Karabiner Elements

Lately, I’ve been trying to learn and use Vim keybindings whenever possible. I don’t have any hard stats to prove that my productivity has increased, but I feel like I spend less time bumbling around editors and more time putting the cursor where I want it. Vim is a great tool in my professional tool belt.

One of the first bits of advice I found after starting my Vim journey was to remap my Caps Lock key to Escape. It’s an easy change to make in most operating systems, and it’s much easier to tap Caps Lock than to reach up for the Escape key (especially on MacBooks with the Touch Bar).

I was surprised, then, when a colleague told me I was crazy for not having Caps Lock mapped to Control instead. I believe there can be a ton of value in that kind of off-hand advice, so I was curious.

I gave it a shot and used the same OS setting to remap Caps Lock to Control instead of Escape. While I definitely saw some benefits (especially with tools like t-mux and fzf, which rely heavily on the Control key), the loss of my easy-access Escape key drove me crazy in no time.

Enter Karabiner-Elements, which bills itself as “a powerful and stable keyboard customizer for macOS.” It’s available for macOS back to 10.9 Mavericks.

I installed Karabiner-Elements and imported one of their dozens of rules: “change caps_lock to control if pressed with other keys, to escape if pressed alone.” It does exactly what it says with no fuss. Now a single tap of my Caps Lock behaves just like tapping Escape. But hitting any other key in addition to Caps Lock behaves just like hitting Control with that other key.

Keybinding nirvana. Now I’ve got easy access to Escape for all of my Vim needs, but I also have easy access to any shortcuts based on Control. If you’re set up with fzf and vi mode in your command line like I am, this mapping is awesome. Easy access to Escape makes vi mode a breeze, and the fzf shortcuts are easier to reach with Caps Lock mapped to Control.

Always be on the lookout for even small bits of advice like this. It’s unlikely that any one small change will wildly affect your productivity. But by staying open to small improvements and building many of them into your setup over time, you can get closer and closer to being a keyboard wizard.