Saturday, 19 July 2008

Switch Caps lock and Escape keys on a Macbook

Textmate has fantastic word completion at hitting Esc key. On Macbook Pros though the key has the worst placement as opposed to the caps lock, which is massive in size and completely useless. I couldn’t find a way in TM to change the shortcut.
fKeys came to rescue, now I have my caps lock as esc so that I can code much faster, hardly ever needing to type the full words on TM editor.

Download fkeys latest beta (fKeys 0.2.1 BETA) at: http://www.kodachi.com/software/fKeys/download.html
This is my plist file (sort of the config file to specify how to switch keys): http://dilanj.googlepages.com/kodachi-macbook-my.plist
My configuration does: 1. Switch the caps lock key and esc key, 2. Turn the ‘Enter’ key in to another Option key. Edit it as you pease, its super simple and easy to understand.

Navigate to /opt/kodachi/fKeys/ in finder. Click on ‘CompileTranslation’ and select the .plist file you download above. This will create a .fkk file that the program can read.
Open ‘ChooseConfiig’, click on ‘Default’ and select the .fkk file you just created.
Open ‘Activate’ and let it do it’s thing.

Thats it, you’ll be coding much much faster on TM. (That is once you stop tripping over the newly place Esc key. Disabling Command+Esc shortcut for Front Row on Os X Prefs might help)

Ps. Esc key word completion is generally universal to OS X.

Thanks Kodachi!