I installed Arch linux on my macbook and Alt-G key combination was producing "ŋ" instead of "@".

to remediate this I edited the /etc/X11/xorg.conf.d/00-keyboard.conf file:

sudo nano /etc/X11/xorg.conf.d/00-keyboard.conf

and changed the option "XkbModel" to "macbook79"

Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "ch"
Option "XkbModel" "macbook79"
Option "XkbVariant" "fr"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection