Sunday 4 September 2011

I hate capslock

Update 4.ix.2011: I'd originally written this in April 2006 but it
appears the following instructions still work in Windows 7.

The standard UK and US 102-ish keyboard layouts annoy me: the capslock
is in the wrong place.

I used to swap the capslock and the left control key, but this usually
caused problems whenever someone else tried to use my computer,
because they'd inevitably hit the key labelled "Ctrl" and end up
turning on capslock.  Eventually, I finally accepted that I _never_
use capslock (well, maybe once a year - max!) and now use three
control keys (i.e. the two standard ones, plus the key which is marked
"capslock").  Note: don't do this if you're a FORTRAN77 programmer AND

In Windows 2000 and XP, there's a feature called the [Scan Code Mapper
which allows you to remap keys.

You can either try to understand the scan code mapper by reading the
page linked above, or just believe that I did it once, trust me and
paste the following lines into a file `ihatecapslock.reg` (or
something similarly imaginative), and then run it through the Windows
Explorer interface.

    ; make capslock key another control key
    [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

If you ever want to scrub your scan code map, i.e. return your
keyboard settings back to the factory default, paste the following
into a file called `resetscanmap.reg` and use it analogously:

    [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

You will have to reboot your PC for the scan code mapper to notice the
registry changes (log-out/-in might be enough to do it too).