MacOS – Map Option to Alt instead of Alt Gr

keybindingsmacos

I've connected an external keyboard to my MacBook Pro. It's a Windows keyboard, but I'd rather not re-learn the swapped order of the Windows/Alt keys (vs. Option/Command keys). So I went to System Preferences, Keyboard, Modifier Keys… and swapped them:

enter image description here

So far, so good. But "Option" isn't really interpreted as "Alt" here Both in VMware Fusion and in Royal TS, the Windows key on the left and the menu(?) key on the right now do what appears to be Alt Gr, with various subtle but annoying differences in Windows, such as:

  • the alt-tab switcher is now sticky. You have to explicitly confirm with enter
  • some letters like alt-o now produce special characters
    keyboard mnemonic (underlined menu items) do not work at all
  • Even though VMware Fusion does offer numerous remapping options, I couldn't figure it out. This trick works. However, that seems hacky and would also need to be applied to every single remote desktop in Royal TS. Not great.

I'd much rather solve this on the Mac side. If I turn the mapping off, Alt does get sent as Alt, so why does swapping the two change it to Alt Gr at all?

Best Answer

It looks like Karabiner-Elements is what I'm looking for.

https://apple.stackexchange.com/a/281437/9422 has been quite helpful. So far, this mapping appears to do what I'd expect (unlike Apple's):

enter image description here