Scancode Map of the magical, the keys to change freely!
in the Windows xp/windows 2000 system, a new keyboard scanning code mapping method is provided, allowing you to freely set the layout of keyboard keys, which is the "Scancode map" in the registry we cleverly use "Scancode map" The ordinary keyboard can be transformed into a casual personalized keyboard.
in order to set it up correctly, it is necessary to understand the "Scancode map" (Scan code map) first.
"Scancode Map" is a binary key value in [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layout] in the registry (default is not, need to create new), and has a fixed format.
Scancode Map Code General format is: "hex:00,00,00,00,00,00,00,00,|02|,00,00,00,| map after the scan code (XX xx), the original scan code (XX xx) |00,00,00,00".
the meaning is:
The first 8 (DWORD two, 0) are the version number and the head byte, and
the next "02" represents the number of mappings, with a minimum value of "02", which means that only one set is mapped (the Numeric values are the number of mappings plus "00,00,00,00" at the end as the end, so they are always larger than the actual number of mappings, to map multiple groups, just add the corresponding values, such as mapping 2 groups whose values should be "03" and 3 Groups "04".
Behind the code every 4 is a group: the first two is the map after the key scan code, the latter two are the original key scanning code. If you want to exchange two keys, one has two sets of mappings, the four values are in the form of: Key A, key B, key B, key a--It means: Key A becomes key B, key B becomes key A. The
ends with "00,00,00,00".
Note:
When you enter in the registry, you need to swap the high and low bytes of the scan code.
In addition, if you want a key to fail, map its scan code to "00 00".
To restore the original layout of keyboard keys, simply locate the registry [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layout] and delete the "Scancode Map "key value
Special Note:
1. Under the current version of Windows, the keyboard mapping is global, not for a user, if you modify the addition or deletion of a mapping, then regardless of the user's use, the keyboard has changed;
In addition, if a computer has multiple keyboards, these keyboards will have the same change.
2. The power SLEEP WAKE up three keys cannot be closed on XP. (not personally tested, the notebook does not have these three keys, if it is not true to buckle it------joking, on the desktop, these three keys through the BIOS settings should be able to disable the corresponding function)
3. The "Fn" key on the ThinkPad cannot be mapped because it cannot be identified by the OS, so it cannot be set using the above method. ThinkPad new version of the BIOS provides a function, so that the left side of the "Fn" key and the adjacent "Ctrl" Key for functional exchange, the sense of usefulness is not very large, the need for friends can go to try. (If this feature is not found in the bios of the notebook, the BIOS needs to be refreshed, the operation is simple, do not fear)
After you import or set or modify or delete registry keys,
Restart your computer , and the change takes effect.
You can also double-click the import registry by saving the following text as "Scancode.reg". The key value can be found by checking the above mentioned Keys table query, find the Scan code you want to replace, the ##,# #替换掉就可以了.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map" =hex:00,00,00,00,00,00,00,00,02,00,00,00,##,##,##,##,00,00,00,00
Once we understand the "Scancode Map", we can use the Add function key. For example, the win key scanning code is: "E0 5B", ESC for "00 01", the left Ctrl for "1D", more detailed scan code see the keyboard scan code.
Example:
For
Example: the aforementioned IBM ThinkPad keyboard, in order to the browser page before and after browsing the key is forbidden, can be set to:
"Scancode Map" =hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,6a,e0,00,00,69,e0,00,00,00,00
For example: said we want to change the F9,F10 key to the volume adjustment key, through the table, you can know:
F9, F10 scan codes are (00,43), (00,44),
The scanning codes for Volume up and Volume down are (e0,30), (e0,2e), respectively,
This allows the scancode to be set as follows: "Scancode Map" =hex:00,00,00,00,00,00,00,00,03,00,00,00,30,e0,43,00,2e,e0, 44,00,00,00,00,00
(Meaning: | Version number and header byte | Two sets of mappings | First Group | Group II | End Terminated | )
I am the "back" and "forward" two keys mapped to "Page Up" and "Page Down", the registry file is as follows:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map" =hex:00,00,00,00,00,00,00,00,03,00,00,00,49,e0,6a,e0,51,e0,69,e0,00,00,00,00
Note again: all changes to the registry must be restarted before the computer can take effect .
Http://blog.chinaunix.net/uid-174325-id-3912617.html
--------------------------------------------------------------------------------
Scancode the Map registry key to implement keyboard key mapping.
Located in the registry:
Create a new binary value entry under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard layout\: "Scancode Map"
This project enables the mapping of keyboard keys. The meaning of the map here can be understood as "replace", which can replace any key with another key.
[Project format]
In 16 notation, divided into five parts, each comma is a byte.
"Scancode Map" = 00,00,00,00,00,00,00,00, 02,00,00,00, 01, 00, 02, 00, 00,00,00,00
- 8 bytes. This is the version information number. Just write as usual.
- 4 bytes. This is the total number of mapping keys. According to the binary reading and writing rules, the low is left and the high is on the right. 02 00 00 00 The number is actually: 00 00 00 02. Starting with 02, a mapping key is 02, two is 03, sliding scale in turn, and 10 is 0 B.
- 2 bytes. Indicates the "Scan code" of the key after the replacement. For example: The ESC key scan code is 01, so it represents 01 00. Then the left CTRL key scan code is 1D 00, and the right CTRL key is 1D E0.
- 2 bytes. Indicates the "Scan code" of the original key. Format Ibid.
- Ended with four of 00.
[Keyboard Scan Code]
In hexadecimal notation, divided into two parts, 0X followed by two digits is the scan code, the last two numbers are ASCII (can be ignored). such as the 0x011b ESC Scan Code is 01.
Scan Code Key
0X011B ESC
0x3b00 F1
0X3C00 F2
0x3d00 F3
0x3e00 F4
0X3F00 F5
0X4000 F6
0x4100 F7
0x4200 F8
0x4300 F9
0x4400 F10
main keyboard area:
0x2960 ~
0x0231 1
0x0332 2
0x0433 3
0x0534 4
0x0635 5
0x0736 6
0x0837 7
0x0938 8
0x0a39 9
0x0b30 0
0x0c2d-
0x0d3d =
0x2b5c " 
0x0e08 backspace
0x0f09 tab
0x1071 q
0x1177 w
0x1265 e
0x1372 r
0x1474 t
0x1579 y
0x1675 u
0x1769 I& nbsp
0x186f o
0x1970 p
0x1a5b [
0x1b5d]
0x1e61 a
0x1f73 s
0x2064 d
0x2166 f
0x2267 g
0x2368 h
0x246a j
0x256b k
0x266c L& nbsp
0x273b;
0x2827 '
0x1c0d enter
0x2c7a z
0x2d78 x
0x2e63 c
0x2f76 v
0x3062 b
0x316e n
0x326d m
0x332c,
0x342e.
0x352f/& nbsp
0x3920 Space Bar
Right numeric keypad:
0x5200 INSERT
0x4700 HOME
0x4900 PAGE up
0x5300 DELETE
0X4F00 END
0x5100 PAGEDOWN
0x4800 Up ARROW
0x4b00 LEFT Arrow
0x5000 DOWN ARROW
0x4d00 RIGHT Arrow
0X352F/
0X372A *
0X4A2D-(Note that this is the numeric keypad)
0x4737 7
0x4838 8
0x4939 9
0x4b34 4
0X4C35 5
0X4D36 6
0x4e2b +
0X4F31 1
0x5032 2
0x5133 3
0x5230 0
0x532e DEL
The left CRTL Scan code is 1D, which represents 1 D 00. The right Ctrl key scan code is E01D, which represents 1 D E0.
The left ALT scan code is 38, which indicates 38 00. The right ALT key scan code is E0 38, which represents the E0.
The left Shift Scan code is 2A, which represents 2A 00. The right Shift key scan code is 36, which means 36 00
Example
1. Shield the left win key
"Scancode Map" =00,00,00,00,00,00,00,00,02,00,00,00,00,00,5b,e0,00,00,00,00
2. Shield right Win key
"Scancode Map" =00,00,00,00,00,00,00,00,02,00,00,00,00,00,5c,e0,00,00,00,00
3. Shielded left and right win two keys
"Scancode Map" =00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00
4. Replace the left Crtl key with the left ALT key
"Scancode Map" =00,00,00,00,00,00,00,00,02,00,00,00,38,00,1d,00,00,00,00,00
Http://www.cnblogs.com/Rainr/archive/2012/01/21/2328046.html
Modifying the mapping of keyboard keys through the registry