Keyboard Remapping in Windows XP
When I found that I had to use Windows for work, the first thing I did was to install gvim and my usual host of plugins. The next thing was to remap caps lock and escape. I switch these when I’m using Linux because I don’t really ever use caps lock, but I use escape all the time (especially in vim). In Linux it’s a simple .Xmodmap entry:
remove Lock = Caps_Lock add Lock = Escape keysym Caps_Lock = Escape keysym Escape = Caps_Lock
In Windows, it’s a bit trickier. You have to add a registry key, and look up the hex codes for the escape and caps lock keys. I found a lot of premade registry files for switching other keys, but apparently I’m the only person who swaps escape with caps lock. Anyway, you just need to paste the following in a file, name it something with a .reg extension, and then double-click it to import the key into the registry.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,01,00,01,00,3a,00,00,00,00,00
This only applies the change to the current user, and you have to log out and log back in for the changes to take effect. You have to change the [HKEY_CURRENT_USER\Keyboard Layout] to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] if you want it to apply to all users.
While you’re at it, you can find a small utility to allow for alt + left-click window dragging and alt + right-click resizing here and another for background window scrolling here.
No comments yet.