Remap Capslock To Esc In Mac Os X

I have an external blue tooth keyboard which has an unusual Home key on top left. This Home key is corresponding to Home key of iPhone / iPad, not one of the Home/End keys.

Whatever. As a result, there isn't an ESC key! Especially for Vim / Vimperator, I cannot use a keyboard without an ESC key.

So I remapped Caps-lock key as ESC key. Here are the steps:

  1. Download PCKeyboardHack and install it
  2. Go to PCKeyboardHack in System Preference.
  3. Enable Caps-lock and set its keycode to 53.

Done.

Update at Feb 22, 2012:
After about 50 days of using Caps-lock as the ESC key for Vim and the other applications, I am pretty familiar with it now. I almost cannot image I could push the real ESC key with that distance and without any wrong hits before.