What really changed with the new keyboard driver?
krh at bitplanet.net
Thu Sep 9 07:50:24 PDT 2004
Kean Johnston wrote:
>> Great, what platform are you on?
> I'm always nervous to admit this until I know the crowd but ...
> SCO OpenServer and UnixWare :/
Heh, no worries ;)
>> The new driver hooks into the os specifc backend by calling
>> xf86OSKbdPreInit() from KbdPreInit() in input/kbd.c. This function
>> fills in the function pointers in the KbdDevRec struct with os specfic
>> implementations. The KbdDevRec struct is defined in
>> os-support/xf86OSKbd.h. The xf86OSKbdPreInit() funtion should be
>> implemented in os-support/<os>/<os>_kbd.c, for example, for linux it's
>> in os-support/linux/lnx_kbd.c. The linux implementation file provides
>> a good overview of what needs to be implemented. Much of the code can
>> probably be lifted from the os-support/<os>/<os>_io.c file as it was
>> done with the linux driver.
>> Hope this helps,
> It most surely does, thank you. I will start work on it right away.
> However, of equal interest to me is what is *better* about the new
It's more cleanly seperated from the server core. The old driver has a
number of os-dependent keyboard driver files in common/ and most of the
state of the old driver is stored in the xf86Info global variable.
Also, the fact that it's not modularized as the other input driver
requires a number of hacks and workaround in the input driver
initialization logic. The new structure allows us to factor out os
specific parts into their own file instead of spamming the
implementation with #ifdef's.
> A quick grep for 'UseDeprecatedKeyboardDriver' in config/cf
> seems to the untrained eye to yield quite a large number of YES's.
> If, as the code says, the old driver will be completely deprecated
> in the next release, are all of those platforms going to be
> updated, or will that change effectively end support for those
If those platforms doesn't provide an os-backend for the new keyboard
driver, I think it's a strong signal that they're no longer maintained.
It's not my call of course to denounce support for those platforms,
but there has been talk about shrinking the list of supported platforms,
and this could be an indicator as to which platforms are alive and which
More information about the xorg