One thing you need to do is add a keyboard layout that has usage of the AltGr (Right Alt) key.
I'm writing this on XUbuntu 16.04 LTS with Serbian (Latin) keyboard layout, and AltGr works like a charm right out of the box. For example, I'm able to type @\|€
, etc without an issue.
If you need help adding keyboard layouts try searching the net, or look at this article.
You can check the keycode that your AltGr key returns by running xev
command in the terminal. Then, press your AltGr key, which should return (in the second row) something like:
keycode 108 (keysym 0xfe03, ISO_Level3_Shift)