I have an annoying UK keyboard which has an Alt Gr key where the right Alt key is on a US keyboard. This is really annoying when using Gnome which makes heavy use of the Alt/Meta key.
Does anyone know how I can map the Alt Gr key to the Alt key?
The 'shift, lock, control, modN' on the left are what X sees and cares about. The keysyms on the right map to them.
For those UK users still pulling their hairs out, this worked for me:
Explanation: The first line removes the current behaviour of your AltGr (which is assigned to the mod5 modifier). The second takes the AltGr key (which on my keyboard produces a keycode of 108), and maps that to whatever keycode your Alt_L key is mapped to.
If you have no idea what is going on with keycodes and keysyms, I found this xmodmap introduction very useful.