is it possible for AHK to remap a key on the keyboard to another one? I mean not the character that they key prints, but the actual key, e.g. I have an international keyboard, it has an aditional key at the right side of the LeftShift, that prints \ but the key above the Right Shift also prints \, I would like AHK to remap the left one, but not the right one. So I can't do something like


cuz it would remap both keys, the one in the Left and in the Right, right

I know software like KeyTweak can do this, but it needs to restart all windows, and it applies to all programs, can AHK do this??


Currently I'm doing this

SC056::Alt    ; SC056 is the key next to the LeftShift

I would like SC056 to be Alt, so that it can work in conjuction with other key modifiers (Shift Ctrl Win) and in combination with any letter keys, ( A, E, I, O, U ), can AHK do this, or I necessarily have to use a key remapper?

I have tried to run my script and press SC056 & o' in order to sendAlt o` but it doesn't work.

THanks Advanced.

2 Answers 2


Yes, it should be possible.

Once an AutoHotkey script is running, open the running program from the tray icon.

Tray Icon > Open

Menu > View > Key History

This will show a history of keystrokes.

Press both keys of interest (as noted in the original post) and then refresh the Key History window. The two keystrokes should show up as two different SC values which can then be used for two different hotkey definitions.

  • 1
    This is also the easiest way to determine a scan code for generally anything without referencing a master list... just hit the keys you want to test and then read out the SC value
    – JJohnston2
    Nov 28, 2016 at 0:23
  • yes thanks, I just got viewed on google, thanks again
    – litu16
    Nov 28, 2016 at 0:26
  • could you please help me on this one, superuser.com/questions/1148186/… I have a problem with the answer, I posted my problem in a comment in the answer, thanks advanced.
    – litu16
    Nov 28, 2016 at 0:29
  • Hi JJhonston, I did it, but it doesn't work with Alt, I reedited the question, please could you check it out? thanks Advanced.
    – litu16
    Nov 28, 2016 at 0:45

This is offtopic but you could remap those keys with Sharpkeys. It will let you change keys in registry.

  • so AHK can't remap keys, so that they can be userd with other modifier keys???
    – litu16
    Nov 28, 2016 at 0:51
  • No, remap will only work while script is acive, and there could be a problem with some applications, games, etc. With Sharpkeys you will remap key in registry. It will be permanent swap for whole Winsows OS, e.g. if you enter BIOS remap will not work. You can remap multiple keys to one, you can swap key and do all kind of crazy stuff. You will also need to log off after every remap.
    – IGRACH
    Nov 28, 2016 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .