How to globally map AltGr key to Alt key? How to globally map AltGr key to Alt key? windows windows

How to globally map AltGr key to Alt key?


Thank you all for answers. I was unable to solve this using AutoHotkey -- PhilLho's answer was close, but I really needed exatly the same behaviour as with left Alt key.

However, the registry thing actually worked as I needed.

Save this as AltGR_to_LeftAlt.reg file and run it:

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,38,00,38,e0,00,00,00,00

Or, there is a GUI tool that does this for you -- it's called SharpKeys and works peachy:
SharpKeys in action

Oh, and don't forget to reboot or log off -- it won't work until then!


As pointed out by PhiLho, Windows provides a way to remap any key, through the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout. A basic overview can be found at Scan Code Mapper for Windows. A better description is probably Answers to Scancode Mapping or Changing Key Values.

I'm using this approach to put the Windows Key on the Caps Lock, because my keyboard doesn't have a Windows Key and I don't need the Caps Lock.


This worked for me:

LControl & *RAlt::Send {LAlt Down}LControl & *RAlt Up::Send {LAlt Up}

And this for mapping it to the Windows key:

LControl & *RAlt::Send {LWin Down}LControl & *RAlt Up::Send {LWin Up}

Registry modification using SharpKeys (see above) is more reliable though (if you have administrator access).