Autohotkey – remap a solid key

autohotkeykeyboardkeyboard-layout

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

\::Numpad0

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??

EDITED>>

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.

Best Answer

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.

Related Question