What keyboard driver is used?
Adam Jackson
ajax at nwnk.net
Tue Jun 27 07:55:23 PDT 2006
On Monday 26 June 2006 13:35, Marvin Raaijmakers wrote:
> I am the developer of keyTouch (http://keytouch.sf.net) which is a
> program that allows the user to bind actions to the extra function keys
> of the keyboard. There are 2 programs in the keyTouch package that are
> interesting in this story. The first is keytouch-init. This program
> assigns kernel keycodes (so not X keycodes) to the scancodes (sent by
> the keyboard) of the extra function keys. The second program is
> keytouchd which grabs the extra function keys under X. To do this it
> needs to know the X keycode of the extra function key. The X keycode is
> not the same as the kernel keycode, so we need a kernel keycode to X
> keycode translation. This translation depends on the keyboard driver
> that is used by X. For example the kbd (this driver is currently only
> supported by keyTouch): because this driver wants scancodes from the
> kernel, the kernel needs to translate the kernel keycode to a scancode
> (done by a fixed table). The evdev driver just wants the kernel keycode
> and uses this a the X keycode.
We don't advertise the keyboard driver in use through the protocol, I don't
think. It might be a sensible thing to add to XInput though.
The approach taken by OpenOffice to figure out which driver is in use is to
scan through the log file, which would more or less work, except that it's
possible to have both kbd and evdev loaded. And then finally the usual way
to do this currently is to add additional XKB config files for the keyboard
in question, and you'd just have to have two, one for evdev and one for kbd,
which you'd have to have in your program anyway.
There might not be a good answer here though.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060627/f0654f3e/attachment.pgp>
More information about the xorg
mailing list