right-alt key not working after changing "keyboard layout change" key to "both alt keys together"

Bug #382473 reported by Oren Laadan
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

After installing a second keyboard layout (default is US, second is IL), I tried to set the "keyboard layout change" key to "both alt keys together". Once done, the right alt key (ALT_R) does not function anymore. For instance, when browsing in firefox, ALT_L + left/right-arrow works, while ALT_R + lef/right-arrow does not.

Workaround: the problem goes away when I change the keyboard layout modifier key to be "ALT_L + caps-lock", or when keeping the default behavior.

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

(was upgraded from 8.04 -> 8.10 -> 9.04)

Note that the problem has been there is 8.04, 7.04 as well, and maybe even earlier. I just recently figured out how to get around it.

Package is probably xorg-xserver:

ii xorg 1:7.4~5ubuntu18 X.Org X Window System
ii xserver-xorg 1:7.4~5ubuntu18 the X.Org X server
ii xserver-xorg-core 2:1.6.0-0ubuntu14 Xorg X server - core server
ii xserver-xorg-input-all 1:7.4~5ubuntu18 the X.Org X server -- input driver metapackage
ii xserver-xorg-input-evdev 1:2.1.1-1ubuntu4 X.Org X server -- evdev input driver
ii xserver-xorg-input-kbd 1:1.3.1-2ubuntu1 X.Org X server -- keyboard input driver

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I've been having the exact same issue. This wasn't because of an upgrade, it happened in a fresh installation of Karmic.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Xev output

Left Alt (No Caps)

KeyPress event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16114342, (91,-14), root:(160,304),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16114459, (91,-14), root:(160,304),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Right Alt (No Caps)

KeyPress event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16116223, (91,-14), root:(160,304),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16116362, (91,-14), root:(160,304),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Left Alt (Caps)

KeyPress event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16217487, (330,56), root:(399,374),
    state 0x2, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16217591, (330,56), root:(399,374),
    state 0xa, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Right Alt (Caps)

KeyPress event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16220639, (330,56), root:(399,374),
    state 0x2, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2200001,
    root 0x10a, subw 0x0, time 16220796, (330,56), root:(399,374),
    state 0x82, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I also looked at this.

xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

A post from somebody using 9.04 had this change instead.
mod4 ISO_Level3_Shift (0x85), ISO_Level3_Shift (0x86), Super_L (0xce), Hyper_L (0xcf)

Revision history for this message
Johannes (kakemphaton) wrote :

Same problem with a fresh Karmic Koala installation: right Alt key has no effect.
VERY annoying as I'm typing French and German and I need special characters.

I once tried to set the "keyboard layout change" key to "both alt keys together" - but I don't know exactly if that's what triggered the bug to appear. On a fresh install right alt was ok, the bug "appeared" after some days.

The fix in comment #1 did NOT work for me, I'm left with a not-working right-alt key :-(

Revision history for this message
Bill Stone (mail-stonebit) wrote :

It's a setting in the keyboard layout. The issue is that the right alt is being mapped for 3rd level characters despite the fact that there are no 3rd level keys in the US. I still think it's a bug, but here's the fix for KDE:
goto System Settings > Regional & Lang > Keyboard Layout
Under 'Layouts' Enable 'Keyboard Layouts'
goto 'Advanced' tab
open 'Key to choose 3rd level'
Uncheck everything except 'Right Alt key never chooses third level'

There's some other interesting settings in there too - useful for customization nuts.
I imagine the setting is similar in Gnome.

Here's the command code too: setxkbmap -option lv3:ralt_alt

Revision history for this message
Johannes (kakemphaton) wrote :

Sorry, the fix does not work for me!

I'm under GNOME by the way... but the procedure is the same.

Does not work with French nor German nor US keyboard.

Thanks for the answer anyway!

Revision history for this message
Carey Underwood (cwillu) wrote :

Still broken in 9.10.

Possibly related, I actually can't turn off "Both Alt keys together", it just comes back after closing the layout options. I can enable and disable other "change layout" items normally.

Also, selecting a "key to choose 3rd level" item restores the right alt.

Revision history for this message
Carey Underwood (cwillu) wrote :

Correction: selecting "right windows key" for "key to choose 3rd level" causes the right alt-key to show up in shortcuts and the like as "super" instead of alt.

Revision history for this message
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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.