right Alt key not recognized by default (lv3:ralt_switch shouldn't be set by default for US keyboard layouts)

Bug #76901 reported by Bryan Silverthorn on 2006-12-22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Colin Watson

Bug Description

Under my default Edgy installation, the right Alt key is not recognized as an Alt key.

xev reports the following:

KeyPress event, serial 26, synthetic NO, window 0x2e00001,
    root 0x4d, subw 0x0, time 2876629954, (-392,496), root:(281,563),
    state 0x0, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2e00001,
    root 0x4d, subw 0x0, time 2876630333, (-392,496), root:(281,563),
    state 0x80, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Selecting the "Alt and Meta are on the Alt keys" option in "Keyboard Preferences" fixes this behavior (right Alt is correctly identified as Alt_R). Hardware is a Samsung Q30 laptop; the selected keyboard layout is "Generic 105-key (Intl) PC".

The following forum threads seem relevant:


The "Press Right Alt key to choose 3rd level" option in "Keyboard Preferences" appears to be selected by default on installation. It cannot be unselected on its own, but selecting a different option (such as "Press Menu key to choose 3rd level") allows it to be unselected, which then also fixes this behavior (the "Alt and Meta" option above does not then need to be selected).

At the very least, a non-Alt right-Alt key is surprising default behavior. The options which appear to alter this behavior, described above, are confusingly named at best (what are "Third level choosers", and why do I care about them?), and appear to default to settings which most users would not prefer.

(EDIT: Also happens in Feisty, Option "XkbOptions" "lv3:ralt_switch" is set by default in xorg.conf, shouldn't be for US keyboards layouts)

Chris Bozic (cbozic) wrote :

I too am having this problem on a Dell D820

Jason Voegele (jason-jvoegele) wrote :

I have installed the kubuntu-desktop on top of an existing Ubuntu Edgy Eft installation, and I am using KDE rather than Gnome.

The right alt key did not function properly by default in KDE either. I found a way to fix the right alt key by going to:

    System Settings > Regional & Language > Keyboard Layout > Xkb Options

On that panel, check the box labeled "Enable xkb options", then select the option "Alt and Meta are on the Alt keys (default)" that appears under "Alt/Win key behavior". This causes the right alt key to function properly just like the left alt key.

However, this caused the special buttons (e.g. the volume buttons, etc.) on my ThinkPad to not work quite as well as they did previously. By default, when I would press the volume buttons while in KDE, the volume would be adjusted and a graphical volume display would pop up showing the volume level. After "fixing" the right alt key as described above, the volume buttons no longer cause the graphical pop up to display, although the volume adjustmet still works.

Brian Murray (brian-murray) wrote :

I can confirm this using Feisty and it is also true when not using X.

Brian Murray (brian-murray) wrote :

Attached is my /etc/default/console-setup file.

Colin Watson (cjwatson) wrote :

The rest of the world knows this as "Alt Gr" - i.e. the right Alt key is used as a sort of secondary Shift key to access less-common characters. For instance, on a UK keyboard layout, AltGr+4 is the Euro symbol. However, apparently this isn't so usual in US layouts, so the defaults will need to be adjusted a bit.

VF (vfiend) wrote :

More info from another bug which has been marked as a duplicate of this one:

Option "XkbOptions" "lv3:ralt_switch" is set by default in xorg.conf.
This can be manually commented out or you can run "sudo dpkg-reconfigure xserver-xorg" and disable the option from in there.

description: updated
Colin Watson (cjwatson) on 2007-03-29
Changed in console-setup:
assignee: nobody → kamion
lpd (lpd-major2nd) wrote :

I'm not sure whether this is the same bug, but xmodmap didn't like the following line in the input file:

keysym Alt_R = Control_L

It said Alt_R was an unknown keysym. I checked /usr/include/X11/keysymdef.h, and XK_Alt_R is defined properly.

If this isn't the same bug, please let me know and I'll file a separate report.

VF (vfiend) wrote :

lpd, did you take the option out of your xorg.conf before trying that?

Colin Watson (cjwatson) wrote :

I think it's too risky to attempt to fix this on upgrades, so I haven't. If you want to do so yourself, change 'XKBOPTIONS="lv3:ralt_switch"' to 'XKBOPTIONS=""' in /etc/default/console-setup and remove the line 'Option "XkbOptions" "lv3:ralt_switch"' from /etc/X11/xorg.conf.

console-setup (1.13ubuntu10) feisty; urgency=low

  * Source debconf confmodule earlier in postinst (it should always be
    sourced as early as possible, as it re-executes the calling script).
  * Fix horrible confusion if the locale has no supported default codeset
    (LP: #84401).
  * Fix console-setup/codeset default to be one of the available choices.
  * Try harder to ensure that we aren't running under X when deciding
    whether to run setupcon on upgrade (thanks to Kurt J. Bosch for
    suggestions; LP: #93338).
  * Don't set an AltGr key by default for US layouts (LP: #76901).

 -- Colin Watson <email address hidden> Sun, 1 Apr 2007 16:49:02 +0100

Changed in console-setup:
status: Confirmed → Fix Released
RodGer (rodger) wrote :

I don't know if it's the same problem but I can't use the right alt key to change layout from Greek to English although I can do the opposite.
Regarding the fact that some don't confirm any relevant problem, it may be because it's a hardware specific problem or even a problem depending on the deferent keyboard layout somebody uses. Maybe later I will give some more information. In the meanwhile please ask me for any data you think that could help.

RodGer (rodger) wrote :

oops!!! Didn't noticed it's a very old bug. Maybe i should file a new bug report.

Richard Hansen (rhansen) wrote :

Yes, I've noticed this problem in Karmic. I believe it's a regression, so filing a new bug report may be a good idea. Also see bug #438520.

Lesmana Zimmer (lesmana) wrote :

there are many bugs about a not working right alt key. and there are many bugs about a not working shortcut to change keyboard layout (left alt + right alt). as far as i can tell fixing the right alt key would also fix the keyboard layout problem.

could someone with more knowledge than me in the topic please look at these bugs and generously mark as duplicate.

in no particular order:

bug #76901 (marked as fixed, but obviously there is a regression)
bug #363363
bug #251443
bug #462249
bug #96434
bug #226676
bug #382473
bug #438520

Thanks Bryan, I still have to use your work around in Ubuntu 10.04 and 10.10.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments