Most people rarely, if ever, mean to use the caps lock key on their keyboard. I found that about 99% of the times I pressed it pushing any key other than caps lock would have been more useful. So I used the Accesibility Control Panel enable a sound when I pushed it. I have since discovered something even more useful.

Windows 2000 includes a Scan Code Mapper which is controled by the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout registry key. To adjust the map you must insert a new value of type REG_BINARY with the name "Scancode Map". That value has the following format:

Start offset  Size      Data
(in bytes)    (in bytes)  
0             4         Header: Version Information 
4             4         Header: Flags 
8             4         Header: Number of Mappings 
12            4         Individual Mappings 
Last 4 bytes  4         Null Terminator (0x00000000)
The version and flags should be set to all 0.
The number of mappings includes the null terminator and is stored as a DWORD(4 byte int)in little Endian format.
Each mapping consists two WORD(2 byte int) in little Endian format. To map each use of the CAPS LOCK key(0x003A) to the left CTRL key(0x001D) ie, 0x003A -> 0x001D, the following map should be typed into regedt32: 1D003A00. Totally disable caps lock by mapping it to 0x0000 with the following map: 00003A00.

The complete REG_BINARY to swap the caps lock and left ctrl keys is: 00000000 00000000 03000000 3A001D00 1D003A00 00000000.

You can also do fancy things such as mapping that silly Application Key to the mute button or even, as the ultimate prank, map every key to the power button!

Please note that you must reboot for changes to the scan code map to take effect. It effects all users.

The keyboard mapper appears to be unchanged in Windows XP. This node works.

Big endian scan code
       Key
0x003A Caps lock
0x001D Left Ctrl
0xE01D Right Ctrl
0xE038 Right ALT
0xE020 Mute
Source: http://www.microsoft.com/hwdev/tech/input/w2kscan-map.asp

Log in or register to write something here or to contact authors.