Bug 5507 - The xkb/rules/xorg file does not work properly for non-AT keyboards
Summary: The xkb/rules/xorg file does not work properly for non-AT keyboards
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Keyboard (show other bugs)
Version: git
Hardware: All All
: high major
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 09:00 UTC by Anton Zinoviev
Modified: 2006-01-12 09:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
A patch for xkb/rules/xorg (30.56 KB, patch)
2006-01-05 09:02 UTC, Anton Zinoviev
no flags Details | Splinter Review
A patch for XKeyboardConfig version of the XKB files (4.37 KB, patch)
2006-01-11 09:02 UTC, Anton Zinoviev
no flags Details | Splinter Review

Description Anton Zinoviev 2006-01-05 09:00:33 UTC
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).
Comment 1 Anton Zinoviev 2006-01-05 09:02:21 UTC
Created attachment 4241 [details] [review]
A patch for xkb/rules/xorg
Comment 2 Matthieu Herrb 2006-01-05 09:39:49 UTC
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. 
Comment 3 Sergey V. Udaltsov 2006-01-05 12:29:25 UTC
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).
Comment 4 Anton Zinoviev 2006-01-06 00:58:35 UTC
(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.
Comment 5 Sergey V. Udaltsov 2006-01-07 05:56:59 UTC
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).
Comment 6 Anton Zinoviev 2006-01-11 09:02:09 UTC
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.
Comment 7 Sergey V. Udaltsov 2006-01-12 09:37:25 UTC
I like this patch much more. Going to commit it ASAP.
Comment 8 Sergey V. Udaltsov 2006-01-12 09:45:39 UTC
Committed. Could you please check xkeyboard-config CVS?
Comment 9 Anton Zinoviev 2006-01-13 04:54:48 UTC
(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.