Remap Your Keyboard

Contents

With Windows 2000, Microsoft introduced a feature called the Windows Scan
Code Mapper. You can read about it on Microsoft's Web site at
www.microsoft.com/hwdev/tech/input/w2kscan-map.asp. TradeKeys 2 uses this
feature to add keyboard mapping support to Windows 2000 and XP. Windows NT 4.0
isn't supported, because it doesn't offer this feature.

The Windows Scan Code Mapper uses data stored in the Registry at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard
Layout, in a binary value named
ScanCode Map, organized as a series of
DWORD values. The first two
DWORDs contain flag and version
information. Under all current versions, these first two
DWORDs are always zero. The rest
of the data is an array of DWORDs.
The first value is a count, indicating the number of
DWORDs that follow. Each of the
remaining DWORDs represents one
key mapping, and the system uses the values as a lookup table. In each
DWORD, the upper
WORD contains the scan code of the
key to be mapped, and the lower WORD
contains either the scan code of the key to which it will be mapped, or zero, if
the key is to be disabled. The last DWORD
in the array must be zero. Note that the count includes this terminating zero.

While this sounds similar to the mechanism that Vkeymap.vxd uses under
Windows 9x, it's not exactly the same. The important difference is that
the mapping takes place after the system has already processed the keyboard's
raw data stream, converting the varying-length series of scan codes that
represent each keystroke to a single WORD
value. For normal keys, the upper BYTE
of that WORD is zero and the lower
BYTE is that key's scan code as
produced by the keyboard. For extended keys, the upper
BYTE contains the prefix scan code
(0xE0 or
0xE1) and the lower
BYTE contains the second scan code
for that key.

So, Windows 2000 and XP users can remap their keyboards any time they want
just by placing the appropriate data into the Registry and restarting the
system. However, this requires intimate knowledge of Registry editing and of the
scan codes for each key on the keyboard. Any mistakes here could be disastrous.
TradeKeys 2 takes care of the remapping tasks for you.

Automatic Renewal Program: Your subscription will continue without interruption for as long as you wish, unless
you instruct us otherwise. Your subscription will automatically renew at the end of the term unless you authorize
cancellation. Each year, you'll receive a notice and you authorize that your credit/debit card will be charged the
annual subscription rate(s). You may cancel at any time during your subscription and receive a full refund on all
unsent issues. If your credit/debit card or other billing method can not be charged, we will bill you directly instead. Contact Customer Service