The file xkb/rules/xorg does not work properly for non-AT keyboards. When the keyboard model is amiga, ataritt, sun4 or sun5 it selects the xfree86 keycodes even though these keyboards generate completely different keycodes. When the keyboard model is a macintosh one it selects properly the keycodes however it limits the layout to one of de, de_CH, dk, es, fi, fr, fr_CH, gb, it, nl, no, pt, se or us (i.e. to the layouts in the directory xkb/symbols/macintosh). I think the attached patch to this file fixes these problems and also simplifies it (26093 instead of 40587 bytes).
Created attachment 4241 [details] [review] A patch for xkb/rules/xorg
the intention in the initial XFree86 code was that each os-specific keyboard handling layer (in os-support/<os>/...) maps the keys into AT keycodes before passing it to the keyboard input driver. While AT keycodes are a bit of a pain to emulate (because of the 2 byte "extended" keycodes), it provides an OS neutral common set of keycodes. When changing xkb definitions, please keep in mind that keycodes may also be OS dependant for a given machine type.
Anton, since you are going to help with non-PC keyboards (which is really great!) could you please look at the way xkeyboard-config _builds_ rules/xorg (actually rules/base) file? If you need any help - we could chat online (IRC/jabber) and discuss the matter. I am very interested in this area, so your help would be appreciated. Since xkeyboard-config is tomorrow's xorg XKB configuration database, it would be more time-effective to fix the problem in our tree, not in the current xorg tree (which is not actively maintained anyway).
(In reply to comment #3) I didn't know about xkeyboard-config, I will take a look. I like the idea of consistent, well-structured, frequently released keyboard configuration data. I have created a package that makes possible to use the xkb keyboard definitions on the Linux text console. The main part is the ckbcomp utility which accepts the same arguments as the setxkbmap and dumps on its output a keyboard definition for loadkeys. For example the command ckbcomp -charmap ISO-8859-15 us,dvorak,fr,fr intl,,,dvorak \ grp:menu_toggle,lv3:ralt_switch | loadkeys will load a keyboard where the menu keys cycles through US, US Dvorak, French and French Drorak keyboards and the right Alt functions as AltGr. The package is almost ready and I hope in no more than in a week I will be able to release it officialy. (Currently the source code is on svn://svn.debian.org/pkg-kbd/people/zinoviev/console-setup.) My interest in the non-AT keyboards is caused by the fact that these keyboards are used on old and slow systems, where X Window is used very rarely. Thats why (I think) the bugs have not been fixed yet. However if we want to use the XKB files on the console of all Linux architectures then the XKB files have to have a good support also for systems where X Window is rarely used. Thats why I had to create this patch.
Anto, it is really good news about your package. The idea to have console keymaps derived from X keymaps was in the air for ages - but I never heard anyone actually implemented it. So, have a look at our project - and you are mostly welcome to contribute. BTW, I strongly recommend you to subscribe to xkb@listserv.bat.ru mailing list (the details are on XKeyboardConfig page on fd.o).
Created attachment 4320 [details] [review] A patch for XKeyboardConfig version of the XKB files The main difference between the functionality of this patch and patch #4241 is that this patch does not try to support compat/* keyboard layouts/variants for non-AT keyboards.
I like this patch much more. Going to commit it ASAP.
Committed. Could you please check xkeyboard-config CVS?
(In reply to comment #8) > Committed. Could you please check xkeyboard-config CVS? As far as I can see it seams OK.
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.