I’ve spent a lot of time looking for a solution to enable the Alt-gr key in my Macbook 2,1 and here it is the magic line:
sudo sed -i~ ‘/xkb_symbols “ralt_switch” {/a include “level3(rwin_switch)”‘ /usr/share/X11/xkb/symbols/level3
This makes the right Apple key to work as Alt Gr.I found it here.



