All articles

How to remap keys on a Mac (Caps Lock, modifiers, and any other key)

There is a key the size of two letters sitting under your left pinky, on the home row, and its entire job is to make you shout by accident. Caps Lock is the most valuable real estate on a Mac keyboard and almost nobody uses it. Remapping it is the cheapest keyboard upgrade there is, and macOS does most of it for free. Here's what you can remap natively, what you can't, and where the third-party tools earn their keep.

What macOS can remap natively

macOS has a built-in remapper, and it's better hidden than it should be. Open System Settings → Keyboard, click Keyboard Shortcuts…, then pick Modifier Keys in the sidebar.

You get a row per modifier — Caps Lock, Control, Option, Command, and the Function/Globe key on keyboards that have one — and each row is a pop-up menu. Set any of them to act as any other modifier, as esc, or to No Action so the key does nothing at all. Restore Defaults puts everything back.

Two details most guides skip:

  • There's a "Select keyboard" pop-up at the top. Settings are stored per keyboard, so you can swap and on a Windows keyboard to match the Mac layout and leave your MacBook's built-in keyboard untouched. Plug in a different board and it keeps its own mapping.
  • It only handles modifiers. This pane cannot turn § into a backtick, F13 into Mute, or Return into anything else. For that you need one of the next two sections.

The remaps worth doing

You don't need a whole layout project. Four changes cover almost everyone:

RemapSet it toWhy
Caps Lock → ControlControlPuts on the home row, which makes the emacs-style text bindings (⌃A, ⌃E, ⌃K) usable everywhere
Caps Lock → EscapeEscapeThe vim reflex, and a real fix on keyboards where esc is a stretch
Caps Lock → No ActionNo ActionIf you just want the accidental SHOUTING to stop
Option ↔ CommandEach otherOn a PC keyboard, puts where your thumb already goes for Alt

If you pick Caps Lock → Control, the payoff is immediate in every text field on the machine — see our guide to Mac text editing shortcuts for the bindings that suddenly become comfortable.

How to remap keys on a Mac beyond the modifiers

For anything that isn't a modifier, macOS ships a command-line tool called hidutil. It takes a source and destination HID usage code and swaps them at a low level, so the change applies system-wide. Caps Lock (0x700000039) to Escape (0x700000029) looks like this:

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}'

Three caveats, in order of how likely they are to bite you:

  1. It doesn't survive a restart. The mapping applies to the current session only. To make it stick you have to run the same command at login from a LaunchAgent or LaunchDaemon plist — the point where a lot of people decide a GUI app is worth it.
  2. You need the usage codes. Every key has one, published in the USB HID tables, and you'll be copying hex strings out of a reference. Fine for one or two keys, tedious for a layout.
  3. Recent macOS may want permission. On macOS 26 Tahoe, remapping alphanumeric keys can require approving hidutil under System Settings → Privacy & Security → Input Monitoring.

To undo everything, set UserKeyMapping to an empty array — or restart.

When Karabiner-Elements is the right answer

Karabiner-Elements is the serious option: free, open source, and the tool every heavy remapper on macOS ends up using. The current release (v16.1.0 at the time of writing) supports macOS 26 Tahoe on both Apple silicon and Intel.

It does things the built-in pane structurally cannot:

  • Dual-role keys. Caps Lock acts as Control when you hold it and Escape when you tap it — the single most popular remap among developers, and impossible natively.
  • Per-device profiles, so an external board and the laptop keyboard can behave completely differently.
  • Complex modifications — sequences, conditional rules, per-app behaviour, and a community rules library you can import.

The honest caveat: Karabiner installs a driver extension, and driver extensions are exactly the kind of thing a major macOS release breaks. Its issue tracker picked up reports after macOS 26 point updates of the driver failing to load or modifications silently not applying. It gets fixed quickly, but if you build your muscle memory on it, keep it updated and expect an occasional rough week after an OS upgrade.

The real payoff: a hyper key

Here's where remapping stops being tidying and starts being a workflow.

Make Caps Lock send ⌃⌥⌘⇧ — all four modifiers at once. That combination is the hyper key, and essentially no app ships a shortcut on it. Which means one keypress opens up an entire namespace of shortcuts nothing else will ever collide with: hyper-T, hyper-W, hyper-Space are yours.

You can build one in Karabiner's complex modifications, or use a small dedicated menu-bar utility — Hyperkey, from the developer behind Rectangle, is a few dollars one-time, and there are free MIT-licensed equivalents on GitHub.

What should live there? The things you do constantly that no app owns — mostly moving between and around windows:

  • Window placement. Most tilers want a hotkey per layout — left half, right third, top-left quarter — so you'd spend a dozen hyper bindings on window positions alone. Let's Tile needs one: ⌘↵ by default and fully rebindable, so hyper-Return can be your only window binding. Press it, a grid drops over the focused window, you steer with the arrow keys and hit . The free tier's 3 × 2 grid covers halves, thirds, two-thirds, quarters and full screen.
  • Getting to the window. Let's Switch sits on ⌥⇥ and flips through your most recently used windows across every app and monitor with a live preview of each, plus ⌥` to cycle one app's windows. Both free.

Neither needs the hyper key — but when you're building a personal shortcut layer, it's worth knowing which tools cost you one binding and which cost you twenty.

What remapping can't fix

Remapping changes what a key sends; it doesn't create new actions. For menu commands, use System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts, typed by exact menu-item name. For launching an app on a hotkey — not a remap at all — see how to open an app with a keyboard shortcut. Anything conditional or multi-step is macro territory: Karabiner rules, Shortcuts, or a dedicated automation app.

Frequently asked questions

Can I remap a non-modifier key without installing anything? Yes — hidutil is built into macOS and will remap any key to any other. The catch is that the mapping resets when you restart unless you set it up to run at login.

Do remaps apply to every keyboard I connect? The Modifier Keys pane is per keyboard — use the "Select keyboard" pop-up at the top to choose which one you're editing. hidutil and Karabiner can both target specific devices too.

Does remapping Caps Lock to Control break anything? Not in practice. You lose the ability to lock caps, which is the point, and Shift still works normally.

Is it safe to install Karabiner-Elements? It's open source and very widely used, but it runs a driver extension with deep access to your input events — install it from the official site and keep it current. If you only need a modifier swap, System Settings does it with no extra software at all.

How do I put everything back? Click Restore Defaults in the Modifier Keys pane, remove any hidutil LaunchAgent you created, and quit or uninstall Karabiner. None of these changes are permanent.

Remapping is a fifteen-minute job you feel every day afterwards. Start with Caps Lock — the key with the worst effort-to-value ratio on the board — and add from there. For the rest of the keyboard-first picture, our Mac keyboard shortcuts for power users guide covers the ones that compound.