The left ALT key works fine, but the right Alt key does nothing. I used xev to check the button and it works. I use it for for shortcuts like Ctrl+Alt+T to open terminal so I want to fix this problem. thanks.

  • Which keyboard layout are you using? – Gunnar Hjalmarsson Dec 23 '18 at 22:44
  • I use English US layout and Greek. – Disjoint Union Dec 24 '18 at 20:38
  • Ok. When the Greek layout is active, Right Alt is used to access third and fourth level symbols, so combinations like <Ctrl>+<Right Alt>+T is not supposed to work. It should work, though, when English US is active, if English US means the basic US layout and not one of the variants. – Gunnar Hjalmarsson Dec 24 '18 at 22:14
  • It doesn't work on either of them. – Disjoint Union Dec 27 '18 at 13:41
  • With English (US), it does nothing but with English (UK), it emits alternative characters in combination with other keys character keys: ¹²³€½¾{[]}\@łe¶ŧ←↓→øþæßðđŋħł", "«»¢“”nµ,· – John McFarlane Nov 7 '20 at 14:19

I had the same problem, and after a lot of googling around in vain I finally managed to discover a solution.

The following solution works both when the English keyboard is selected, and when the Greek keyboard is selected. (Or any other keyboard for that matter, I suppose.)

Open "Tweaks" (aka "Gnome Tweaks") go to Keyboard & Mouse > Additional Layout Options > Key to choose the 3rd level and put a check mark on Right Alt never chooses 3rd level.

screenshot showing Additional Layout Options dialog

If you want to be able to achieve the same thing via the command line:

The corresponding dconf setting is /org/gnome/desktop/input-sources/xkb-options, the value 'lv3:ralt_alt' must be included in the array of values for that key.

After setting the value of this key, the tweak tool then causes the setxkbmap command to be invoked, with some parameters that actually do the trick on the fly, but I have not been able to figure out what those parameters are, so my guess is that if you only do dconf then you will need to restart your login session for the changes to take effect.

<rant-mode> I suppose the problem here is that Ubuntu is a) trying to offer an impossibly oversimplified interface which yields an unusable computer out of the box, so you absolutely have to resort to things like the "Gnome Tweaks" tool, and b) this tool is offering so many incredibly arcane and entirely useless options, that the one little option that actually matters is hidden in the noise. </rant-mode>

  • Did not solve the problem for me, is a restart needed? – lony May 25 '20 at 10:14

Try checking response in terminal

run the command: $ xev in your terminal and check whether its a hardware issue or a software

In my case the Right Alt Key was returning some additional value showing as:

XkeysymToKeycode returns keycode: 92 <----[issue]

XFilterEvent returns : False <---- [this is fine]

That is my keyboard was working perfectly fine.

Surprisingly I found that my text-entry language has changed to English(UK). So when I changed it to English(US) everything started working perfectly fine.


Using "Right Alt never chooses 3rd level" you also disable the compose key, which might not be favorable to some users.

But I guess, this is what changing keyboard layouts is invented for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.