Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Obviously, in Linux I can use xmodmap. On Leopard, I used an InputManager called PCKeyboardHack. But InputManagers are now broken.

How can I preserve my sanity and keep on using Caps Lock to Escape in OS X 10.6?

share|improve this question
up vote 3 down vote accepted

I may be way off as I'm nowhere near my Mac to check, but would Ukelele be able to remap the Caps lock? I know you can remap the Caps lock using system preferences too, but I think the possible replacements are limited (again away from a Mac to test)...

You could also see if doublecommand has that mapping included, as reports suggest it works in 32bit kernel mode in SL at least...


There seems to be a PCKeyboardHack fork for SL:

share|improve this answer
Thanks! The new build of PCKeyboardHack has solved it. My fingers and my sanity thank you in advance! – Tom Morris Sep 2 '09 at 20:18
Glad to help; you should mark this question as answered ;-) – The Tentacle Sep 3 '09 at 11:24
PCKeyboard hack totally the way to go. – Jason Sundram Jan 29 '11 at 22:32
  1. Open System Preferences
  2. Open the Keyboard Preferences
  3. Make sure you're on the 'Keyboard' tab
  4. Click 'Modifier Keys'
  5. Change them to whatever you like.
share|improve this answer
While this is nice, it can only remap between Caps Lock, Control, Option and Command. Notice the lack of Escape, Delete, Return, and Shift. PS Does it annoy anyone else that menus and dialogs use symbols for caps lock, control, shift, option and escape that simply don't actually appear on the keyboard? – dlamblin Sep 24 '09 at 21:07

It's not really an answer to your question, but I imagine you want to remap the key so your finger hasn't so far to travel to switch Vim modes. A week or two ago I discovered that Ctrl-[ is the same as hitting Esc, and easier to type even though it's two keys.

I'd suggest teaching your fingers to do Ctrl-[ instead, then you don't need to remap any keys and you don't lose Caps-lock functionality.

share|improve this answer

had two issues when compiling.

1: Make sure you have the developer stuff in your path. specfically, add the following line to your path:


2: some bizarre error with otool not being found: the error I got looked like this "*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'launch path not accessible' "

use this to resolve it:

ln -s /Developer/usr/bin/otool /usr/bin/otool

after that, everything worked for me.

share|improve this answer

Though this does not answer your question it might be the solution to your problem:

" Mapping ESC in insert mode and command mode to double i
imap ii <C-[>
cmap ii <C-[>

Put this into your .vimrc file. After that you can press ii to get out of insert or command mode. You do not need to reach out to your ESC or CAPS lock key.

share|improve this answer

I use Seil to remap my Mac keyboard

  1. Download Seil
  2. Check 'Change the caps lock key'
  3. Change keycode from 51 to 53

Note, you must also nullify the default Caps Lock key from your Mac Keyboard settings.

  1. Settings->Keyboard->Keyboard tab
  2. Click on Modifier Keys (bottom right)
  3. Change Caps Lock setting from 'Caps Lock' to 'No Action'
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .