tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Xorg keymap and wskbd keymap

> May I try to share my views on the subject ?

Yes, of course.

> - the use of PC-AT inspired keycodes in X for all systems was a design
>   decision back in the  XFreee86 times. It helped to keep the xf86 DDX
>   code for the non-xkb case simple.
>   But, given the limitations of this encoding (terrible "extended"
>   keycodes, lack of standard mappings for extra keys,...) this was
>   probably a mistake.

Ok, I agree.

>   At the same time, the X server has made XKB mandatory, and
>   xkeyboard-config is beeing maintained with the ability to handle
>   different keycodes tables without adding more code to the DDX.
>   So nothing in the current X.Org X server mandates PC-AT keycodes
>   anymore.


In this case, do we still have to prepare XKB keymap files
for all weird keyboard we support?

I know X.Org already has many maps for major machines,
but we have much more minor machines in our tree.

> - So I've been thinking about moving away from xf86-input-keyboard for
>   wscons too. This means writing a new xf86-input-wskbd input driver
>   (or add keyboard support to the existing xf86-input-ws driver
>   which can already replace xf86-input-mouse for wsmouse). This
>   driver, together with a set of xkb keycode descriptions would allow
>   to simplify the keyboard mapping process, by  removing the
>   extra-layer of going through this awkward PC-AT emulation.
>   BTW the same remark applies to wsmux for pointing devices (wsmouse).

I have no idea about wsmux, but most our orphaned ports will never
have more than one keyboard, it will be another project.

> So if someone wants to grab the flag, and start implementing a wscons
> specific X input driver, you'll have my support.

Well, in NetBSD world, people often imagine the perfect world
but we often failed and got nothing ;-p

My first compromise^W goal is to implement a generic Xorg wscons
driver that doesn't require independent keymap settings for various
machines to reduce maintainance cost for our orphaned^W favorite ports.
I thought it could be done by replacing KbdGetMapping() function
assigned in xf86-input-keyboard/dist/src/bsd_kbd.c.

We already have keymap files in kernel and we can get it
via WSKBDIO_GETMAP ioctl(), so I think we can generate mappings
between wscons keycode <-> XK_foo keysym at run time once we prepare
a function which translates wscons keysym to X keysym.
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index