Configure the keyboard mapping using scancode map

17 April 2001 by Snakefoot | Comment » | Trackback Off
It is possible to change the behavior of the different keys on the keyboard by changing the scancode map. This can be used to disable the Windows-key so one is not thrown out of your favorite game, when by accident have pressed the wrong key.

The change the scancode map, so the Windows-key is disabled add/update this binary value:


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,\

For those who wants to know the meaning of the above values here goes:

00,00,00,00Header: Version. Set to all zeroes.
00,00,00,00Header: Flags. Set to all zeroes.
03,00,00,003 entries in the map (including null entry).
00,00,5b,e0Left Windows Key (0xe05b) -> Disable (0x00).
00,00,5c,e0Right Windows Key (0xe05c) -> Disable (0x00).
00,00,00,00Null entry.

To also disable the Shutdown key, one would extend the Scancode Map, so it has 4 entries where the fourth entry becomes ACPI Power Key (0xe0f6) -> Disable (0x00):


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,04,00,00,00,00,00,5b,e0,00,00,5c,e0,\

Note it is also possible to map the the Shutdown keyboard key to become Sleep shortcut by going to Control Panel -> Power Options -> Advanced Tab.

More Info KeyTweak by Travis Krumsick
More Info SharpKeys by
More Info Microsoft Keyboard Layout Creator (MSKLC)
More Info Scan Code Mapper for Windows
More Info MS KB Q181348
More Info MS KB Q216893

Related Using keyboard shortcuts/hotkeys to quickly access programs

Credits Jason Tsang

Updated: 3 March 2010


Comment by Steve - 28 July 2009 @ 3:16 Reply

Love it … do you know how to assign multi keys to one key? EG push f10 to emulate ctl+alt+S??


Comment by Jim - 29 April 2010 @ 14:36 Reply

Best Explanantion of scancode map and how to read the HEX values of this registry string I have found on the www.
Thanks very much.

Comment by DRG - 24 January 2012 @ 12:30 Reply

Thanks for the info..! this can also be used for disabling print screen..!

Comment by Washington - 3 August 2012 @ 21:06 Reply

I opened regedit and saw I don’t have HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout in my Windows XP Pro. What do I do? I don’t want to disable the Windows key, just replace “/” to “?”.

Comment by polidoro - 10 October 2012 @ 13:06 Reply

And what about “$” ? shift+4…..I need this for a software I use in my office. I´d like to change shift+4 to other key without must to use shift. Thanks

Leave a comment

NB! Use the Forum for computer help and off-topic questions.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>