> That is, unless there is some way I am unaware of of finding out the mapping for a well known keyboard layout (e.g. US) for the current system via the X protocol - preferably a method which doesn't depend on XKB.
Such a mapping doesn't necessarily exist: what if you're not using a PC keyboard at all, but have a weird phone-style keyboard? Or if your backend is, say, OS X, which has a slightly different approach to handling keycodes?
The best you can do right now is take the rules and model of the mapping you want to compare to, and compile a keymap with the same rules and model, but with the layout set to 'us'. And that might work, in the most case.
In any case, XKB, painful though it is, is _the_ keyboard mapping for X11, and that's never going to change. Not least because it's exposed at all levels through the totally immutable Xlib ABI.
Posted Oct 26, 2012 11:51 UTC (Fri) by michaeljt (subscriber, #39183)
[Link]
> In any case, XKB, painful though it is, is _the_ keyboard mapping for X11, and that's never going to change. Not least because it's exposed at all levels through the totally immutable Xlib ABI.
For my purposes XKB is not particularly painful - dealing with Windows oddities is much worse. The only reason that XKB-less methods interest me is for dealing with servers which don't have it. Not sure how many that is these days, but I am sure that some VNC-like servers will fall into that category - and tend to be rather interesting from a keyboard handling point of view.