[PATCH] Input device properties

Peter Hutterer peter.hutterer at who-t.net
Tue Jul 8 00:32:46 PDT 2008


This patch adds input device properties modelled after randr output
properties (and by modelled I mean mostly copied).

Why do we want them?
Currently the method to talk to a driver is through the ChangeDeviceControl
request, which basically routes binary data from the client to the driver and
vice versa. Adding new control types requires a protocol bump.

The properties are simply X atoms that can be set on the device, and allow for
arbitrary options without having to update the server and/or the protocol.
Long-term this would allow us to deprecate the ChangeDeviceControl request.

Additional patches for libXi, app/xinput and xf86-input-evdev are available in
http://people.freedesktop.org/~whot/patches/device-properties
The evdev driver provides the ability to set middle button function + timeout
through properties as a simple demo.

Example usage for xinput:

whot at emu:~$ xinput --list-props "USB Optical Mouse"
Device 'USB Optical Mouse':
        Middle Button Emulation:        2
        Middle Button Timeout:          50
whot at emu:~$ xinput --set-int-prop "USB Optical Mouse" "Middle Button Timeout" 16 500 

Note that some of the patches require cleanup and no documentation has been
written yet. Unless there's any NACKs, I'll push by the end of the week and
try to get the specs updated.

Cheers,
  Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Xi-add-support-for-input-device-properties.patch
Type: text/x-diff
Size: 31440 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080708/d44e1e2f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-XI-device-property-requests-and-replies.patch
Type: text/x-diff
Size: 7724 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080708/d44e1e2f/attachment-0001.patch>


More information about the xorg mailing list