[Bug 19947] xkbcomp-1.0.5: Group width mismatch between key and type

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 22 15:10:06 PST 2009


On Sat, Feb 21, 2009 at 08:15:36PM +0100, Martin MOKREJŠ wrote:
>   Should I use in HAL .fdi files "input.xkb.layout" or
> "input.x11_options.XkbLayout"?

the latter is for X server specifics, the former for system-wide
configuration (e.g. . The latter overrides the former. Both are fine to set.
For example, in Fedora we set the input.xkb.* keys automatically from
/etc/sysconfig/keyboard, but you can override them through the x11_options for
specific devices if you need to.
 
>   I don't know the internals of xorg server, so ... I am puzzled why
> the /usr/bin/xkbcomp is being called twice, as logged in Xorg.0.log.
> I even cannot find the file to existing for teh currently running
> instance:

xkbcomp is called once for each keyboard (i.e. once for each
input.capabilities = input.keyboard device).
you most likely have multiple of those.

> (**) Option "xkb_rules" "evdev"
> (**) AT Translated Set 2 keyboard: xkb_rules: "evdev"
> (**) Option "xkb_model" "evdev"
> (**) AT Translated Set 2 keyboard: xkb_model: "evdev"
> (**) Option "xkb_layout" "us,cz"
> (**) AT Translated Set 2 keyboard: xkb_layout: "us,cz"
> (**) Option "xkb_variant" ",qwerty"
> (**) AT Translated Set 2 keyboard: xkb_variant: ",qwerty"
> (**) Option "xkb_options" "grp:alt_shift_togglegrp_led:scrollcaps:shift_nocancel"
> (**) AT Translated Set 2 keyboard: xkb_options: "grp:alt_shift_togglegrp_led:scrollcaps:shift_nocancel"

this last line is wrong, see below.

> xkb_keymap {
> xkb_keycodes "evdev+aliases(qwerty)" {
[...]
 
> xkb_types "complete" {
[...]

> xkb_compatibility "complete" {
[...]

> xkb_symbols "pc+us+cz(qwerty):2+inet(evdev)" {
[...]

this is what actually is loaded in the server. You see how all your options
are missing? This is because of a wrong setup (fdi file below).

when I run setxkbmap with the settings you're presumably trying to get:
$> setxkbmap -layout "us,cz" -variant ",qwerty" -option "grp:alt_shift_toggle"\
 -option "grp_led:scroll" -option "caps:shift_nocancel" -print 
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete+caps(shift_nocancel)" };
        xkb_compat    { include "complete+ledscroll(group_lock)"        };
        xkb_symbols   { include "pc+us+cz(qwerty):2+inet(evdev)+group(alt_shift_toggle)"        };
        xkb_geometry  { include "pc(pc104)"     };
};

this command should work for you. (remove the -print option to set it and check the server log)


>     key <LFSH> {         [         Shift_L ] };
>     key <RTSH> {         [         Shift_R ] };
>     key <LALT> {         [           Alt_L,          Meta_L ] };
>     key <RALT> {
>         type[group2]= "ONE_LEVEL",
>         symbols[Group1]= [           Alt_R,          Meta_R ],
>         symbols[Group2]= [ ISO_Level3_Shift ]
>     };

here's the details why it doesn't work, the Alt/Shift keys dont have the
required ISO_Next_Group, ISO_Prev_Group they should have, hence group
switching doesn't work.

> <?xml version="1.0" encoding="utf-8"?>
> <!--
>     Identifier "Logitech Internet Keyboard"
>     Option     "XkbLayout"     "us,cz"
>     Option     "XkbVariant"    ",qwerty"
>     Option     "XkbOptions"    "grp:alt_shift_toggle,grp_led:scroll,caps:shift_nocancel"
> 
>     # instead of the above allow AllowEmptyInput and define the hal rules
>     Option "AllowEmptyInput" "True"
> -->
> <!-- http://cgit.freedesktop.org/xorg/xserver/tree/config/x11-input.fdi -->
> <deviceinfo version="0.2">
>   <device>
>    <match key="info.capabilities" contains="input.mouse">
>       <merge key="input.x11_driver" type="string">mouse</merge>
>       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
>         <merge key="input.x11_driver" type="string">evdev</merge>
>       </match>
>    </match>
> 
>    <match key="info.capabilities" contains="input.keyboard">
>       <merge key="input.x11_driver" type="string">evdev</merge>
>       <merge key="input.xkb.rules" type="string">xorg</merge>
>       <merge key="input.xkb.model" type="string">evdev</merge>
>       <merge key="input.xkb.layout" type="string">us,cz</merge>
>       <merge key="input.xkb.variant" type="string">,qwerty</merge>
>       <!-- replace 'strlist' with 'string' on 'input.xkb.options' lines,
>            see http://bugs.gentoo.org/show_bug.cgi?id=237742#c5 -->
>       <merge key="input.xkb.options" type="string">grp:alt_shift_toggle</merge>
>       <append key="input.xkb.options" type="string">grp_led:scroll</append>
>       <append key="input.xkb.options" type="string">caps:shift_nocancel</append>
>    </match>
> 
>    <match key="info.product" contains="Video Bus">
>       <remove key="input.x11_driver"/>
>       <remove key="input.xkb"/>
>    </match>
> 

I hope this is the actual part that takes effect, because with all the bits
that are comments in that file I lost track of what actually matters now. In
the future, please remove things that look like configurations but are just
comments.
 
Anyway, this explains your troubles, xkb options need to be separated
by commas, you're just appending strings (a leftover from what I guess used to
be your strlist configuration), leading to the string we saw in the log. this
string doesn't represent a valid option, so nothing happens.
either append commas, or just do away with the <append> tag and add
everything in the <merge> line, comma-separated of course.

Cheers,
  Peter



More information about the xorg mailing list