Left Alt key should work as right Alt key (Alt Gr)
Solution 1:
Swapping Left ALT & Right ALT functions
-
The following command will set:
- Left ALT as level3-switch or ALT Gr
- Right ALT as normal-alt or ALT
_
gsettings set org.gnome.desktop.input-sources xkb-options "['lv3:lalt_switch','lv3:ralt-alt']"
Effective immediately.
-
To reset it:
gsettings reset org.gnome.desktop.input-sources xkb-options
or
gsettings set org.gnome.desktop.input-sources xkb-options "[]"
Notes:
- To see all available options for all modifier keys make a look on
/usr/share/X11/xkb/rules/xorg.lst
- There are other hacks, I don't recommend. Like changing line
include "level3(ralt_switch)"
or swapping key codes in X11/xkb layout files.
Solution 2:
First, select System Settings
:
Select Keyboard Layout from the presented window :
You will be presented with a list of all available layouts. Just press the Options button:
Lastly, from the presented list select Alt/Win key behavior
and modify to your needs:
Solution 3:
Ubuntu 18:04
gnome tweaks -> Keyboard & Mouse -> Additional Layout Options -> Key to choose the 3rd level -> Any Alt