How to enable Alt-Gr on Ubuntu 16.04?

On my Ubuntu 16.04 laptop installation, Alt-Gr does not work. So I cannot type characters like {, }, ~, | etc. (doing this on my PC where everything works). I tried various suggestions from multiple Ubuntu wikis, forums, Ubuntu support site: Nothing works.

Most solutions are for older Ubuntu versions, a lot seems to be different on Ubuntu 16.04: There is no System Preferences (you can install the app manually, but there are no keyboard settings there), I don't find Keyboard Layout anywhere...

This is not a duplicate of Alt-Gr key is not working in Ubuntu 13.10, Ubuntu 16.04 is different!

Edit: Found the keyboard layout display, and it matches the keyboard (now). But Alt-Gr combinations don't work.


I discovered in System Settings → KeyboardShortcutsTyping that the Alternate Characters Key is set to Disabled.

I changed Disabled to Alt-Gr (right Alt key) and it works now. No need to change and reconfigure the keyboard type.


It's working now. Here's all I changed, maybe it helps somebody else:

  • Changed the keyboard type to Generic, 105 keys, intl., using the sudo dpkg-reconfigure keyboard-configuration command.
  • Removed all input sources to use from the list, except one.
  • Finally, in System Settings > Keyboard > Shortcuts > Typing, set Alternate Characters Key to Disabled.

Ubuntu 16.04 Dec 27, 2017

System Settings > Keyboard > Shortcuts > Typing changed the compose key to Right Alt

Now I can use the other keys Alt+o,o=° or Alt+',e=é and so on.