Windows – Where to find windows keyboard scancode registry information

keyboardwindowswindows-registry

I am in the process of remapping some keys on my Windows 7 keyboard.

I have done the following (in a .reg file):

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 

I am interested in being able to remap other keys. However, I am having a heck of a time finding the specific scan codes to do this.

Is there a listing of these scan codes somewhere? I've spent a fair bit of time trying to find information and other than the caps/control I cannot seem to find them. I would like a listing of all scan codes – in a format which makes sense for remapping.

The specific keys I am interested in are:

  • Menu button (wtf windows)
  • windows key
  • alt
  • shift
  • function
  • insert
  • pause

Best Answer

@fabianroling and anyone else who can't use third-party software: the Keyboard Scan Code Specification from Microsoft has the definitions for all the scan codes. It also says the following:

Under all Microsoft operating systems, all keyboards actually transmit Scan Code Set 2 values down the wire from the keyboard to the keyboard port. These values are translated to Scan Code Set 1 by the i8042 port chip. The rest of the operating system, and all applications that handle scan codes expect the values to be from Scan Code Set 1.

So, nothing Windows-specific, just standard Set 1 codes.

Related Question