iamnearlythere

Remap Caps-lock to Esc in OS X Lion

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.

  1. 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).
  2. Next, to bind caps-lock to the functionality of esc, install theĀ PCKeyboardHack
  3. Follow the instructions on the page in the link and use the keycode 53 for escape.
  4. You're done.

Via Using Caps Lock as Esc in Mac OS X