How to set Alternative Characters Key in Ubuntu 18.04

I am using Ubuntu 18.04. Our language need to use Alternative Characters Key in "Typing". I can use this option in Ubuntu 16.04 and didn't find in Ubuntu version 18.04. How do I set this in Ubuntu 18.04?

enter image description here

Updated!...............

The Following picture is our keyboard layout. In Ubuntu version 16.04, Firstly I installed our keyboard and then go to Keyboard >> Typing >> and set Right Alt for Alternative Character Key.

In the following picture, I pointed to two arrows with different colors to words. Red Arrow pointed word is Main Word. If I want to type Blue Arrow pointed word, I need press the Right Alt and then press "P". So It will work. Currently I am facing the problem in 18.04 for type some of these Characters which was use by pressing Alternative Character Key in 16.04. Please solve my problem. Thank you.

Our Keyboard Layout


You need to install gnome-tweaks and go to the menuitem 'keyboard & mouse'. From there, the button 'extended options' lets you reassign the key. In your case, you don't have an AltGr, it is a right Alt. Please set your preferences accordingly. You want to have the 3rd level assigned to your right Alt and maybe the 4th level to Shift right Alt if I get your intentions right.

The keyboard layout picture was really helpful to clear up the confusion.


For many layouts, you'll need to set Gnome Tweaks Compose Key to Right Super(see pic below). Youĺl need to click on whatever it shows instead of "Right Super" to select this.

enter image description here non AltGr is actually Right Super in many layouts.

Once you select this you can use "English(US,int., with dead keys)" layout which is great for writing in English and Spanish without need to change the layout (this or similar could be useful for other international Latin-based languages with accents, tilde or similar special chars). For Spanish in particular, it allows one to type an ñ by just typing AltGr+n while using an USA keyboard which is the most practical/ organized qwerty layout if you are using more than just alphabetical symbols, i.e {}][;?<,./... as it is not filled with ñ, ç or similar...


Building on the two answers above, I mapped a 3rd level (Typically AltGr) to Left Alt by installing gonme-tweeks and selecting:

Keyboard & Mouse -> Additional Layout Options -> Key to choose 3rd level -> Left Alt

Gnome tweeks menus