Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Apple mini-USB keyboard I am using with Windows 7. My ultimate goal is to permanently remap the F12 key to be "Delete" so I can log in with Control+Alt+Delete (apple's keyboard only has backspace).

I have identified the keyboard scan codes for the keys I want to remap using AutoHotKey.

  • Delete - 153
  • F12 - 058

I have some experience with using the registry to remap keys such as caps to control, in this example:

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,1d,00,3a,00,00,00,00,00

The registry code for Control as per this example is 3a,00 and its scancode is 03a. It seems you need to just remove the leading 0 in this case to remap the key.

How does this work when your scancode has a value on this leading digit? Am I suppose to just use 53 as the code?

share|improve this question
Could you not have used something like AutoHotKey to remap it. – Dave Aug 12 '13 at 15:03
@DaveRook AHK only works once the script is launched, which unfortunately does not happen when I restart the machine as I have not logged in the first time yet. Trust me, if I could use AHK for this I would have :) – enderland Aug 12 '13 at 15:27
Thank you for this information, I hadn't realised! – Dave Aug 12 '13 at 15:29
up vote 3 down vote accepted

The scancodes in the registry are in hexadecimal (base 16), and include two bytes. The first byte is sometimes used as an escape code (0xE0), as for the delete key:

Control's scancode is 58 or 0x003A
F12's scancode is 88 or 0x0058
Delete's scancode is escaped 83 or 0xE053

This results in the following registry edits to make this change (note you have to increase 02,00,00,00 to 03,00,00,00 to indicate the additional key):


What you want to do though, is get a utility called SharpKeys, which will provide a GUI interface to modify the registry key map. You can then compare and examine the registry key before and after to see how it changed the entry.

share|improve this answer
So to be clear - you are saying the .reg format would be 53,00 for delete and 58,00 for F12? – enderland Aug 12 '13 at 15:29
Also, SharpKeys is rather awesome. Thanks! – enderland Aug 12 '13 at 15:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.