xorg conf user defined driver

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 27 22:00:18 PDT 2014


On Tue, Oct 28, 2014 at 03:48:46AM +0100, Arne.Adams at t-online.de wrote:
> Hi,
> I can get the input events as extension events in the client, but I don't want to get them as extension events.
> Instead I want to be able to get them as "normal" keypress/keyrelease events.
> The background for that is a legacy application using a patched x-server to support the proprietary keyboard.
> And for a variety of reasons it was decided to use a standard x-server instead of a patched one.
> I don't want to change all x-clients in that application to support the proprietary keyboard, when the patched x-server is no longer used. 
> What can I do to make the x-server dispatch my input events as "normal" keypress/keyrelease events?

there are very few applications that use extension events, most applications
still use core events. fire up xterm or xev and they all get core events.
unless your patched X server had some incompatible changes and the
application relied on this, a uinput based keyboard device will just work
with no changes to the config or the server.

so again, the problem seems to be in your test application. try xev

> Could it be that my test setup is the reason: I am developing on a laptop (with the standard keyboard of course present all the time) while connecting to the proprietary keyboard?
> I can imagine that the x-server notes, that there is already a core keyboard, and hence decides to publish keyboard events from other devices than the core keyboard as extension events.

no, that hasn't been the case since server 1.6, iirc, a number of years ago.
and we tried to make that backwards compatible anyway.

Cheers,
   Peter

> 
> -----Original-Nachricht-----
> Betreff: Re: xorg conf user defined driver
> Datum: Tue, 28 Oct 2014 00:48:35 +0100
> Von: Peter Hutterer <peter.hutterer at who-t.net>
> An: "Arne.Adams at t-online.de" <Arne.Adams at t-online.de>
> 
> On Mon, Oct 27, 2014 at 05:31:21AM +0100, Arne.Adams at t-online.de wrote:
> > Hi,
> > In a previous post (http://lists.x.org/archives/xorg/2014-October/056903.html) I mentioned problems
> > with intercepting uinput events in an X client as non-extension events.
> > I was not able to solve this problem.
> > Hence I decided writing an X-input driver module using the howto from http://www.x.org/wiki/Development/Documentation/XorgInputHOWTO/ as starting point.
> > I modified the sample, installed it (output from make install:
> > ...
> > libtool: install: /usr/bin/install -c .libs/smiths-kbd_drv.so /usr/local/lib/xorg/modules/input/smiths-kbd_drv.so
> > libtool: install: /usr/bin/install -c .libs/smiths-kbd_drv.lai /usr/local/lib/xorg/modules/input/smiths-kbd_drv.la
> > ..
> > ),
> > modified my xorg.conf:
> > Section "InputDevice"
> >     # to enable user defined virtual keyboard
> >     Identifier     "Hitrax-KBD"
> >     Option         "Device" "/dev/sh-kbd"
> >     Driver         "smiths-kbd"
> > EndSection
> > 
> > When I start writing to the device my driver won't get loaded, instead evdev is used.
> > xorg log:
> > [  4680.681] (II) config/udev: Adding input device sh-kbd (/dev/input/event14)
> 
> a uinput device shows up as evdev device, so you'll have the device
> configured in your xorg.conf _and_ the evdev device. and that is handled by
> the catchall rule.
> 
> you'd have to either write a snippet to ingnore the sh-kbd device or write
> an InputClass snippet that overrides the driver for your device (probably
> using MatchProduct).
> 
> all that aside: if you can't get extension events in your client, changing
> input drivers won't help you. the problem is in your client. whether to send
> extension events is decided in the server, the input drivers have no say in
> that.
> 
> Cheers,
>    Peter
> 
> > [  4680.681] (**) sh-kbd: Applying InputClass "evdev keyboard catchall"
> > [  4680.681] (II) Using input driver 'evdev' for 'sh-kbd'
> > [  4680.681] (**) sh-kbd: always reports core events
> > [  4680.681] (**) evdev: sh-kbd: Device: "/dev/input/event14"
> > [  4680.681] (--) evdev: sh-kbd: Vendor 0x1 Product 0x1
> > [  4680.681] (--) evdev: sh-kbd: Found keys
> > [  4680.682] (II) evdev: sh-kbd: Configuring as keyboard
> > [  4680.682] (**) Option "config_info" "udev:/sys/devices/virtual/input/input20/event14"
> > [  4680.682] (II) XINPUT: Adding extended input device "sh-kbd" (type: KEYBOARD, id 15)
> > [  4680.682] (**) Option "xkb_rules" "evdev"
> > [  4680.682] (**) Option "xkb_model" "pc105"
> > [  4680.682] (**) Option "xkb_layout" "de"
> > 
> > Note that with the following device option
> > Option         "Device" "/dev/input/event14"
> > 
> >  I get the same failure log
> > Thanks in advance for any help...
> > 
> > 
> > Arne
> 
> 
> 


More information about the xorg mailing list