Bug 14373 - xkb: Alternative layouts don't work due to groups "invented" by the server
Summary: xkb: Alternative layouts don't work due to groups "invented" by the server
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-04 14:04 UTC by Matthias B.
Modified: 2008-10-28 15:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-xkb-fix-core-keyboard-map-generation.-14373.patch (2.56 KB, patch)
2008-09-21 20:34 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Matthias B. 2008-02-04 14:04:08 UTC
The following configuration doesn't work with xorg-1.4.0.90:

Section "InputDevice"
    Identifier  "Keyboard"
    Driver      "kbd"
    Option      "AutoRepeat"    "250 30"

    Option "XkbModel" "pc105"
    Option "XkbLayout" "de,de(nodeadkeys)"
    Option "XkbOptions" "grp:caps_toggle"
EndSection

Symptons:
When you press the "a" key, you get an "a" when switched to one group, but an "æ" when switched to the other group. Most other keys are broken, too. The reason is that for all keys where the 2 layouts have identical mappings and which therefore should contain only 1 group (xkbcomp optimizes away identical groups) the server "invents" a 2nd group that contains the last 2 symbols from group1.

Example: Here is the symbol mapping of the "a" key as reported by xkbcomp :0 - after starting the server with the above configuration.

key <AC01> {
 type[group1]= "FOUR_LEVEL_ALPHABETIC",
  symbols[Group1]= [  a,  A,  ae, AE ],
  symbols[Group2]= [  ae, AE ]
 };

And here is how it should be

key <AC01> {
  type= "FOUR_LEVEL_ALPHABETIC",
  symbols[Group1]= [  a,   A,  ae,   AE ]
 };

And this is indeed what you get when you issue the command 

setxkbmap -layout "de,de(nodeadkeys)"

after the server has started. Why is this different? The 2 should be the same, shouldn't they?

Unfortunately, due to bug #14359, putting the setxkbmap command into .xinitrc can not be used as a workaround.
Comment 1 Peter Hutterer 2008-09-21 20:34:31 UTC
Created attachment 19077 [details] [review]
0001-xkb-fix-core-keyboard-map-generation.-14373.patch


Patch sent to list for review.
http://lists.freedesktop.org/archives/xorg/2008-September/038743.html

Note that this patch most likely requires a follow-up patch to get rid of the duplicate groups again.
Comment 2 Peter Hutterer 2008-09-25 17:14:22 UTC
Pushed as ae986d1c73d2f720bd0309d8c33328d14e8eed25
Comment 3 Daniel Stone 2008-10-28 15:08:31 UTC
*** Bug 18277 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.