Setting Up a Hyper Key with Karabiner-Elements
Caps Lock as Escape on tap, Hyper on hold, and a home-row navigation layer on top. The exact config I run.
By Branden Garrett · Updated
Contents · 4 sections
A hyper key is Caps Lock turned into Command, Option, Control, and Shift pressed at once. No app uses that combination, so every shortcut you bind to it is yours. (Why it's worth doing, and the simpler ways to get one: The Caps Lock Key Is Wasted.)
This is how I set mine up. Karabiner-Elements does the work, and I get two things the simpler apps can't do: Escape on a tap, and a whole navigation layer under my left hand.
Install
Download Karabiner-Elements. It's free. On first launch it asks for Input Monitoring and a driver extension in System Settings → Privacy & Security. Approve both. If your remaps don't do anything later, look there first.
The Core Rule
The simple version is a single rule from Karabiner's built-in gallery: Settings → Complex Modifications → Add predefined rule, then search for "caps lock to hyper." If you want to write it yourself, it's short:
{ "description": "Caps Lock: Escape on tap, Hyper on hold", "manipulators": [ { "type": "basic", "from": { "key_code": "caps_lock", "modifiers": { "optional": ["any"] } }, "to": [ { "key_code": "right_shift", "modifiers": [ "right_command", "right_control", "right_option" ] } ], "to_if_alone": [{ "key_code": "escape" }] } ]}That's the exact core of my config. Two details matter:
to_if_aloneis the tap-for-Escape part. Hold and you get Hyper; tap and release and you get Escape.- Right-side modifiers. Hyper sends the right Command, Control, Option, and Shift. That leaves the left-side keys free, so you can hold Hyper plus left Command or left Option and get a second and third layer. Most people skip this. It's the part that makes the setup worth it.
The Navigation Layer
I didn't write my rules from scratch. I use Vonng's Capslock Enhancement rule set, which builds a full navigation layer on top of Hyper:
- Hyper + H/J/K/L = arrow keys, Vim-style.
- Hyper + U/I/O/P = Page Up, Home, End, Page Down.
- Add left Command to select instead of move (Hyper+Cmd+H selects left).
- Add left Shift to switch tabs and apps (Hyper+Shift+H/L for the previous/next tab).
- Add left Control to move between desktops (Hyper+Ctrl+H/L).
- Add left Option to move the mouse, and Hyper+Enter clicks.
- Hyper + Escape toggles real Caps Lock, for the rare time you want it.
Most days I never leave the home row. Moving the cursor, selecting a word, jumping tabs, and switching desktops all go through the same key under my left pinky.
That's It
Install, add the rule, approve the permissions. The key under your pinky goes from useless to the one you press most.
Keep reading
- Setting Up Alfred: A Faster Command+Space and Clipboard History →What Alfred is, what it costs, and the three things I set up first on any new Mac. The checklist I send coworkers.
- The Caps Lock Key Is Wasted. Make It a Hyper Key. →Hold one key and you get a modifier no app uses. Here are the ways to set one up on a Mac, and which one to pick.