Comment 5 for bug 138131

Revision history for this message
In , Bryce Harrington (bryce) wrote :

Created an attachment (id=22257)
dell latitude d620.xkb

Forwarding this bug from a Ubuntu reporter:
https://bugs.edge.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/138131

[Problem]
There is no geometry file for the Dell Latitude D620 laptop with french keyboard. User has come up with a partly-working geometry but gets an error trying to use it.

[Original Report]
Hello! I'm using a Dell Latitude D620 laptop, with a French keyboard (I'm not sure if the others are the same), and I noticed there's no geometry file for this model in Ubuntu.

If you open the Keyboard Preferences applet, the Layouts tab, and try to pick a keyboard model, you'll notice a "Dell Latitude series laptop" model. Unfortunately this is quite different from what the keyboard looks like on my machine. I've spent a lot of time today trying to create another geometry file (ie, something appropriate to append to /usr/share/X11/xkb/geometry/pc) with only moderate success.

The main problem is that I couldn't find a decent tool to actually check my resulting layout. What I did was dump the current X config to an .xkb file (call it layout.xkb) using xkbcomp, edited it, then I used
      $xkbcomp layout.xkb && xkbprint -color -label none -level2 layout.xkm && ps2pdf layout.ps && xpdf layout.pdf
to take a look at it. This baroque system was needed because:
(a) I can't figure out how to get a "clean" xkb file, and I don't know how to look at a "geometry" description by itself;
(b) for some reason xkbprint often generates ps output that either is broken, or is understandable by neither ps2pdf nor evince;
(c) also xkbprint fails with strange errors if I tell it to display the labels on the keys. This happens on the file compiled by xkbcomp, so I don't think it's an error in my layout.
(d) even if it does work, for some reason evince sometimes can't read the resulting pdf. Weird, I know. I might even file a bug report next time this happens. Anyway, only (a)--(c) are really relevant.

That being said, I have been able to create a layout that _looks_ like the keyboard I have. I can compile it, and xkbprint generates a graphic if I set it to not display labels (as above). But it doesn't show the keysims, so I doubt they're set completely right. There are some weird keys on the laptop and I'm not sure how to deal with them, or if it's even necessary (they all work with the default keyboard "model" which doesn't show most of them). I'm guessing they're mostly cosmetic.

Anyway, I tried to hack the resulting geometry section into the /usr/share/X11/xkb/geometry/pc file and rebooted. The new layout is shown in the Keyboard Preferences applet list, but if I try to pick it I get an error. It's not very descriptive, it just says something was wrong and to contact the Xorg guys with the output of two commands. I checked (see below), they only display the current settings at the time, which isn't very helpful because I know them.

$ xprop -root|grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "xorg", "pc104", "us", "dvorak", ""
_XKB_RULES_NAMES(STRING) = "xorg", "latitude", "us,fr", "dvorak,", "ctrl:swapcaps,altwin:super_win,grp:alts_toggle"
$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = [us dvorak,fr]
 model = latituded620
 options = [ctrl ctrl:swapcaps,altwin altwin:super_win,grp grp:alts_toggle]
 overrideSettings = true

So, what I'd need is for someone to coach me into finding out what's wrong with the geometry, debugging it, and generally getting it to a state where it can be accepted into Ubuntu (and pushed upstream). I'll attach the xkb file right away.