Menu Close

Make Your CAPS LOCK Key Do Double Duty As a Modifier Key and Caps Lock

Your Caps Lock key might be underused on your Mac. If you’re a big automation geek, why not use it for something else, in addition to its built-in functionality? Karabiner Elements is a Mac tool that lets you customize the keyboard on your Mac, including the Caps Lock key. In this post, I’ll talk about how I’ve set up my Caps Lock key to be used as an extra modifier key (similar to the Command, Control, Option, and Shift keys), while at the same time preserving its normal functionality.

Background

This post was inspired by Brett Terpstra, who has similarly configured his Caps Lock key, and calls it a Hyper key. The difference is that Brett uses his Caps Lock key as an Escape key, in addition to being a modifier key. I wanted mine to retain its Caps Lock functionality, instead of being an Escape key. In his post, Brett mentions in passing how to retain Caps Lock functionality, but I found I needed to add one additional line to a configuration file to get this to work.

Instructions – Step 1

Note: If you don’t want to mess around with editing a config file yourself, jump to the All-In-One solution, below, and download the file I’ve provided. Step 1, by itself, will remap the Caps Lock key as a modifier key, but you’ll lose Caps Lock functionality.

Out of the box, Karabiner Elements lets you change your Caps Lock so pressing it will trigger a press of Command+Control+Option+Shift, a key combination that normally requires some dexterity to press. Do this by going into Karabiner Elements’ Preferences, going to the Complex Modifications Tab, clicking “Add Rule,” and choose “Change caps_lock to command+control+option+shift.

Karabiner Elements settings

Instructions – Step 2

If you follow the basic instructions above, you’ve now remapped your Caps Lock key to be a modifier key, but it no longer works as a traditional Caps Lock key. It you want to restore Caps Lock functionality and use Caps Lock as a modifier key, you need to do a bit more wrangling. Here’s how.

You need to edit a hidden file, found at ~/.config/karabiner/karabiner.json. To view hidden files on your Mac temporarily, open Finder and hit Command+Shift+Period. Then go to your User folder, and browse down into the .config folder at the path above, until you find the karabiner.json file.

Just below the part of the file containing to_if_alone, find this line:

"key_code": "caps_lock"

and replace it with these two lines:

"key_code": "caps_lock",
"hold_down_milliseconds": 100

ALL IN ONE SOLUTION

If you want an all-in-one solution, allowing you to skip the above steps, I’ve uploaded my karabiner.json file for you to download. You’ll need to unzip the downloaded file, and move the karabiner.json file into the location mentioned in Step 2, above.

Final step

Whether you do this manually or download the file, above, you’ll need to manually quit Karabiner Elements and restart it. Once I did so, I was pleased to find Caps Lock worked as normal if I tapped it, and it worked as my modifier key if I held it down.