What keyboard driver is used?
Daniel Stone
daniel at freedesktop.org
Wed Jun 28 02:31:20 PDT 2006
On Tue, Jun 27, 2006 at 10:55:23AM -0400, Adam Jackson wrote:
> 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.
Yeah, it's definitely doable, but this is about the only useful case I
can think of, and I don't want to encourage others to do stupid things.
;)
> 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.
I don't want to know why OOo needs to know this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060628/3b77afce/attachment.pgp>
More information about the xorg
mailing list