Sign up ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I generally run Linux. I use Vim a lot, so the Escape key is extremely important. I also use other keyboard shortcuts a lot, so Control is "key" as well. On Linux, I've solved this by using xcape to map the Caps lock key to Escape if pressed by itself, or Control if pressed in combination with another key. This puts the best of both worlds within quick reach of my pinky finger. Is there any way I can do this on a Mac?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

Yes, using Karabiner (formerly KeyRemap4Macbook).

First, go into the Keyboard preference pane, click "Modifier Keys…", and change Caps Lock to Control. Then, go into Karabiner and search for this option:

Control_L to Control_L
      (+ when you type Control_L only, send Escape)

Check that, and you're done. With Karabiner you can do lots more interesting things, like mapping your (now kind of useless) Escape key to a Hyper key with even more keybindings.

share|improve this answer
Very cool! Thanks! I love this ecosystem. – BenjaminRH Jun 2 '14 at 3:08
is it possible remap esc to caps lock and map caps lock to control and escape? Because sometime, I still feel the need to use caps lock to type a long upper case string. – Aaron Shen Jul 21 at 23:36
Karibiner now tells you to change Caps Lock to "No Action" in the OSX Keyboard preferences (instead of setting it there to Control) and to use Seil, Karabiner's sister program to do the remapping. The last part of the above answer (+ when you type Control_L only...) is still done in Karabiner. – ScoBe Oct 1 at 15:16
@AaronShen just remap escape to caps lock ;-). – user1737909 Oct 28 at 8:37
@ScoBe I'd recommend against doing that, you really don't need Seil, – user1737909 Oct 28 at 8:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.