Get Rid of the Emacs Pinky

For a couple months now I have been using my dear old Emacs when doing Ruby stuff (with IDEA and Eclipse still taking care of me whenever I’m working with Java), and I had completely forgotten what happens to your left pinky when you use Emacs too much.

Put simply, it hurts. Lots.

If you have never used Emacs in anger, this cheat sheet might give you an idea: all those capital C’s are Ctrl key combinations, so in Emacs parlance, “C-x, C-f” means holding Ctrl and pressing x and f in sequence.

After mentioning this to a friend who uses Emacs all day, exclusively (and is also one of the finest C programmers I’ve known personally), he pointed me to this little trick he has used for a few years now: remapping the Caps Lock key to become another Ctrl key.

So, for those out there stuck on a tiny Dell laptop keyboard and running Windows XP, here’s the solution I’ve used: create a file named remap_capslock.reg and paste this into it:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

Execute it, restart, and enjoy being unable TO SHOUT IN NEWSGROUP DISCUSSIONS OR WRITE END USER LICENSE AGREEMENTS while your pinky thanks you.