Replacing CapsLock with Ctrl
The CapsLock key can be remapped relitively easily in Windows using the
scancode map. The scancode map is used by Windows to translate from one
keyboard event (represented by a scancode) to another. The scancode is stored
in the registry at the following entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map
The format of the entry is as follows:
- The first two words are zero (to be honest, I am not sure what they are for)
- The next word contains the length of the remaining data (including the null terminator)
- Each subsequent word is comprised of two entries:
- The first short is the translated scancode
- The second short is the original scancode
We can use this entry to map CapsLock (0x003A) to Control (0x001D). The
resulting entry would look as follows:
00000000 00000000 02000000 1D003A00 00000000
This registry script will perform the modification for you. Just download and open with RegEdit.