The Linux Page

Right Alt key not working at all, why?

It has been a while that my right Alt key acted as the Level3 key instead of a right Alt key. I never cared for the AltGr on my QUERTY keyboard, but it kept popping up as the Level3 key even though I clearly removed that option in the keyboard settings under /etc/default/keyboard

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
#XKBOPTIONS="lv3:ralt_switch"
XKBOPTIONS="compose:caps"

I commented out the level3 definition and instead put "compose:caps" which makes my CAPS Lock key work as a compose key (i.e. if you press 'Caps Lock' + 'a' + '.' then 'ȧ' appears!)

The truth is that these two options are overwritten by the Gnome options. So if you go in your preferences / settings, whatever you call that one, then click on Keyboard, you find a window with two tabs: Typing and Shortcuts. Click on Shortcuts and in the list on the left, search for Typing.

In there, one of the options is "Alternative Chracter Key". That's the AltGr key. By default they set that key to the Right Alt key. (I have an old SGI keyboard without the additional "windows" keys.)

I set that entry to Disabled and voilà! My Right Alt key now works as expected allowing me to use it with the arrows and the Delete key (Ctrl-Alt-Delete with a single hand!)

Keyboard settings showing the exact tab and entry to change to avoid the Level3 feature.

Source that helped me find the settings.