Oct 212017

Men are often irrational beings. For example I simply hate F1 key. I know, that key is there to give me help but realistically if I need help I will google for it. Absolutely every time I press F1 it is by accident and it leads to annoying wait for Help to load – especially in Microsoft Office. That key is useless!

Fortunately, deep in Microsoft’s Keyboard and mouse class drivers documentation there is a chapter on scan code mapper for keyboards. In short, there is a functionality enabling us to remap any key just by writing entry in registry without any external programs.

At first I though to simply disable F1 key. But reading a bit further into documentation I though better – why not use F1 key as a mute button?

For this conversion it is necessary to know codes for both F1 and Mute key. A bit of searching later I’ve found that information in USB HID to PS/2 Scan Code Translation Table. This ancient document has exactly what we need under “PS/2 Set 1 Make” column. F1 key has scan code 0x3B while mute is a bit more involved 0xE020 (disabling would be 0x0000).

Format of Scancode Map field is a bit confusing at first, but table examples do help a lot. For my use-case, table would be as this.:

Value Field Interpretation
0x00000000 Version Set to all zeroes.
0x00000000 Flags Set to all zeroes.
0x00000002 Count Two entries in the map (including null entry).
0x003BE020 Mapping Remap <F1> (0x3B) to <Mute> (0xE020).
0x00000000 Mapping Termination entry.

These values would need to be written in registry under key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout as binary entry named Scancode Map. Of course, since binary data has to be little-endian, (hex) value would actually be:

00000000 00000000 02000000 20E03B00 00000000

Or one can simply download prepared registry file for creating mapping and, if necessary, removing the same.

[2017-11-13: You can check codes using Scancode Viewer.]

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>