From: Peter Hutterer Date: Mon, 23 Feb 2015 00:28:02 +0000 (+1000) Subject: doc: document udev device tagging X-Git-Tag: 0.11.0~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79e64ce0b51a62b6827729bc194a88c013c66b5d;p=platform%2Fupstream%2Flibinput.git doc: document udev device tagging Signed-off-by: Peter Hutterer --- diff --git a/doc/device-configuration-via-udev.dox b/doc/device-configuration-via-udev.dox index 9c44a515..4107f943 100644 --- a/doc/device-configuration-via-udev.dox +++ b/doc/device-configuration-via-udev.dox @@ -20,6 +20,16 @@ the value itself is irrelevant otherwise.
ID_SEAT
Assigns the physical seat for this device. See libinput_seat_get_physical_name(). Defaults to "seat0".
+
ID_INPUT
+
If this property is set, the device is considered an input device. Any +device with this property missing will be ignored, see @ref +udev_device_type. +
+
ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, +ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, +ID_INPUT_ACCELEROMETER
+
If any of the above is set, libinput initializes the device as the given +type, see @ref udev_device_type.
WL_SEAT
Assigns the logical seat for this device. See libinput_seat_get_logical_name() @@ -41,4 +51,29 @@ ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", ENV{ID_SEAT}="seat1" @endcode + +@section udev_device_type Device type assignment via udev + +libinput requires the ID_INPUT property to be set on a device, +otherwise the device will be ignored. In addition, one of +ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, +ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, +ID_INPUT_ACCELEROMETER must be set on the device to determine the +device type. The usual error handling applies within libinput and a device +type label does not guarantee that the device is initialized by libinput. +If a device fails to meet the requirements for a device type (e.g. a keyboard +labelled as touchpad) the device will not be available through libinput. + +Only one device type should be set per device at a type, though libinput can +handle some combinations for historical reasons. + +Below is an example udev rule to remove an ID_INPUT_TOUCHPAD setting +and change it into an ID_INPUT_TABLET setting. This rule would apply +for a device with the vendor/model ID of 012a/034b. + +@code +ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", \ +ENV{ID_MODEL_ID}=="034b", ENV{ID_INPUT_TOUCHPAD}="", ENV{ID_INPUT_TABLET}="1" +@endcode + */