The AltGr (RightAlt) is a keyboard layout functionality. For example, if you use the default
Great Britain keyboard layout, you (are forced to) get the AltGr functionality.
The proper solution is to change the variant of the keyboard layout. Thus, if you do use the Great Britain layout, change to some other variant for Great Britain.
Looking into /usr/share/X11/xkb/symbols/gb I see that there are no alternative for layouts that do not use the AltGr key.
So, for this example you would need to
gksudo gedit /usr/share/X11/xkb/symbols/gb
and then make this change (erase a line):
@@ -26,7 +26,6 @@
key <BKSL> { [numbersign, asciitilde, dead_grave, dead_breve ] };
key <LSGT> { [ backslash, bar, bar, brokenbar ] };
- include "level3(ralt_switch_multikey)"
};
partial alphanumeric_keys
(find this segment in the file, then remove the line that starts with the -
.
Then, logout and log in again. The change we did here simply mutilated the default Great Britain layout so that these extended characters are not accessible anymore.