Remap caps-lock to esc in OS X Lion

Oct 1, 2011

The reason for removing caps-lock is mainly about being faster in vim at exiting entered modes, but also since I never use it and it’s always in the way. Instead of just removing the key, we could make it usable though, and bind it to escape. The process is fairly easy.

First you need to disable the key "controlling case sensitivity" (= caps lock). You find the option in System Preferences > Keyboard > Modifier keys (in the first tab).

Next, to bind caps-lock to the functionality of esc, install the PCKeyboardHack

Follow the instructions on the page in the link and use the keycode 53 for escape.