Take Back Your Keyboard!
A good friend of mine has gone to great lengths in refining the pathway between his brain and his computer. That is to say, he's serious about keyboard design.
I'm not quite ready to invest in an ergonomic (and scary looking) keyboard-as-cereal-bowl, or the ultimate extreme, hacking up my own Dvorak variant.What I am willing to do, however, is repurpose my utterly useless Caps Lock.
Thanks to inspiration from Bill in 2006 and lots of experiments since, I am now able to publish my findings on the subject. VIM users' most frequently used key is probably Escape. For me that means moving my ring finger about three inches diagonally away from the home row, maybe a few hundred times an hour. Plus, the top row is frequently smaller than the other rows. It's actually designed to be hard to hit without effort. Caps Lock, meanwhile, is both enormous and well within pinky range on the home row.
For Windows, it's a registry hack which I've written about before. Create a file called CapsLockEscape.reg
and paste this text into it, save it, and double-click. You'll have to log out and log back in (or reboot) for it to take affect.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00
For the Debian and Ubuntu consoles, add this line to /etc/console-tools/remap
, then either run /etc/init.d/console-screen.sh
or reboot.
s/keycode 58 = Caps_Lock/keycode 58 = Escape/;
For X11, create a file called ~/.capslockescape
with the following contents, then run xmodmap ~/.capslockescape
to try it out. Add that command to your ~/.xinitrc
to make it permanent.
remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock
The hard part was Mac OS X Leopard. I went so far as to open a RentACoder.com auction for someone willing to write the appropriate keyboard driver. I opened the bidding at $100, and offered it to everyone who had written keyboard macro software for the Mac. One Takayama Fumihiko declined the offer but linked me to something he had already written, PCKeyboardHack. The magic number is 53.