[RFC PATCH] Initial libudev input-hotplug support

Dan Nicholson dbn.lists at gmail.com
Thu Oct 1 16:40:04 PDT 2009

On Thu, Oct 1, 2009 at 7:54 AM, Julien Cristau <jcristau at debian.org> wrote:
> On Wed, Sep 30, 2009 at 11:34:52 -0700, Dan Nicholson wrote:
>> One thing I was hoping was not to have the options input from the
>> device configuration again. Having people migrate their setups to hal
>> was not fun, and now they'll have to do it again to udev rules files.
>> I have a couple patches that just need some polishing that add a
>> InputClass xorg.conf option which allows matching against device
>> properties and applying InputDevice options. That way the input
>> configuration for hal, udev and any future input notifiers would be
>> consolidated in the place where the server is supposed to be
>> configured.
>> Does that sound like something useful? Then the config/udev backend
>> would simply listen for input devices and pass them on to
>> NewInputDeviceRequest where the Xorg could do what it wants.
> I'm happy to remove the x11_options stuff from config/udev.c if there's
> a way to set options for hotplugged devices from the ddx.  Does driver
> selection also move to the ddx, leaving only xkb in config/?  Or should
> we have that in both, and let the ddx override the driver chosen by dix?

I envisioned that the ddx would entirely be in control of the driver
since they're typically ddx specific anyway. Basically, my patches
allow this:

# Path based matches (probably superfluous on linux)
Section "InputClass"
        Identifier "Evdev Devices"
        DevicePattern "/dev/input/event*"
        Driver "evdev"

Section "InputClass"
        Identifier "Generic Keyboard"
        IsKeyboard "yes"
        Option     "XkbModel"   "pc105+inet"
        Option     "XkbLayout"  "us"
        Option     "XkbVariant" "intl"
        Option     "XkbOptions" "terminate:ctrl_alt_bksp"

# Don't have Ignore yet, but it would be easy
# NameContains is for the product name
Section "InputClass"
        Identifier "Bad Device"
        NameContains "bad vendor"
        Ignore "yes"

# This is a catch all match since there are no property specifiers
Section "InputClass"
        Identifier "Generic Input"
        Driver     "evdev"

The options merge over each other, so you can use progressively more
generic matches. I'll post the patches in the next couple days after I
ensure they work again.


More information about the xorg-devel mailing list