Windows registry keyboard Scancode map

Windows registry keyboard Scancode map
You can remap (assigning a different key input to a key) or disable (Null input) keys of your windows PC or laptop by creating a registry value .Disabling a key is very helpful when it comes to Stopping [Automatic repeated key pressing]. Remapping involves assigning a different key input to a pressed key.(eg - "Tab" key to act like "Delete" Key ). You might ask why remap ?, Let's say you have a keyboard that the "Delete" button is not working .Since the "Delete" key is such a important key you can assign that input to a less used not that important key such as "~" key so when you press "~" key the function of the "Delete" key will happen .



 HOW TO CRATE A SCANCODE VALUE

Windows RUN window
Windows RUN window
 1.0  Press both "Windows" key and "R" key of your keyboard to get the "RUN" window

 2.0  Type "regedit.exe" without quotes in the text field and press "Enter" .
windows registry path for keyboard layout
Registry path for keyboard layout


 3.0  Now you will see the Registry Editor window now expand "HKEY_LOCAL_MACHINE" and under that expand "SYSTEM" then expand "CurrentControlSet" then expand "Controls" then click on "Keyboard Layout" .



 4.0  Right click on the right side plane of the window and select "New" and then select "Binary Value" .This will create a new binary value key . Rename the key as "Scancode Map".
Scancode map value
Scancode map value

you can rename the value right away by typing the name  .
renaming registry value


OR by right clicking on the newly created key and choosing "Rename"from the drop down list.


Registry Edit binary value
Registry Edit binary value

 5.0  Now double click on the created key and type the value in the "value" text field



SCANCODE MAP VALUE

SCANCODE MAP VALUE
Let's take an example - Let's say ,That you need to disable "ESC" Key .Here is the "Scancode map" value for that - 00 00 00 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 00 .Let's examine this value ,There are 20 2digit hex value inputs .Each individual set can hold values from 00 to FF (decimal 255) .Here is how this value was build up .

Scancode value for disabling "Esc" key
Scancode value for disabling "Esc" key

[ Please ignore the commas ]
Version - Header version value (leave it 00 00 00 00 ).
Flags   - Header Flags values  (leave it 00 00 00 00 ).
Number of Entries - Amount of entries including null entry at the end.(In this case 2 = null entry + one key entry )
First key Value - It is the hex value of the key that we wants "Second key value" key to be remapped to .(In this case it's 00 which is the disable value)
Second Key Value - It is the hex value of the key that we wants to remap or disable.
Null entry -  (leave it 00 00 00 00 )

The value of "Number of entries need to be increased as we remap or disable more keys ,Always add one to the number of entries that you are going to made. because you need to include the null entry at the end .

[ If you wants key hex value for different keys ,Click HERE ]

Above example is about disabling a key ,Lets look into a remap example .Let's say we wants to remap my "delete" key to "Tab" key .which means when I press the "Delete" key it should behave like the "Tab" key .[ Please ignore the commas ]

Scancode value for remapping of "Delete" key
Scancode value for remapping of "Delete" key
As in the above example the "Version" ,"Flag" and "Null" values are 00 00 00 00 and the Number of entries are two ( One entry + Null Entry ) .The First key value which is the hex value of the key that we wants "Second key value" key to be remapped to is 0F 00 (Hex value of "Tab" key ) .The second key value is the hex value of the key that we wants to remapped is 53 E0 (Hex value of "Delete" Key.

[ If you wants key hex value for different keys ,Click HERE ]

DISABLE OR REMAP MORE THAN ONE KEY 

In above examples we talked about remapping and disabling a single keyboard key .Lets see how to remap more than one key .In this example we will remap "Home" key to "Enter" key and disable "F1" key . Before we start lets look in to the key hex values - Home = 47 E0 , Enter = 1C 00 , F1 = 3B 00 and Disable = 00 00 .

Scancode value for remapping of "Home" key and disable "F1" key
Scancode value for remapping of "Home" key and disable "F1" key
Unlike above examples we have two keys to be changed .The Version, Flags and Null Entry  remains the same value ( 00 00 00 00 ) .The "Number of Entries " is "03 00 00 00 " (Two Entries + One Null Entry = 3 ) .The first entry is the entry for the mapping of "Home" Key(47 E0) to "Enter" key (1C 00). The Second entry is for disabling (00 00) the "F1"key (3b 00) .

As you can see all you have to do is -

 1.0  Write the "Version value" first which is always 00 00 00 00  .

 2.0  Then Write the "Flags value" which is always 00 00 00 00.

 3.0   "Number of entries" equals number of keys that you wants to change plus one (Null Entry). Ex - If you need one key to be remapped or disabled "Number of entries" = 02 00 00 00, If you need two keys to be remapped or disabled "Number of entries" = 03 00 00 00, If you need three keys to be remapped or disabled "Number of entries" = 04 00 00 00 .

 4.0  Add your key entries right after "Number of Entries" value .Write each entry after one another .

 5.0   Write the "Null Entry" ( 00 00 00 00 ) at the end .

 6.0  Restart your PC or laptop to see the changes .



post first image

6 comments:

favicon Unknown said...

Mujhe pixel saftweyar chahiye

favicon Ajay said...

Thanks for the post, Helped me a lot

favicon Ajay said...

Thanks for the post, Helped me a lot

favicon Anonymous said...

I wish to map an "External" Enter key, to become Escape..!?
Will you please post instructions for this..?

favicon learnitstepbystep said...

What did you mean by "Extranal" Enter key ?

favicon Unknown said...

update: sometimes entry keys should be in reverse specifically in win10. i tried escape with tilde but instead it became tilde with escape. according to this code entry should be 01,00,29,00 instead of 29,00,01,00