2014-12-22 10:11:09 +10:00
|
|
|
/**
|
|
|
|
|
@page udev_config Static device configuration via udev
|
|
|
|
|
|
|
|
|
|
libinput supports some static configuration through udev properties.
|
2015-02-23 10:26:56 +10:00
|
|
|
These properties are read when the device is initially added
|
2014-12-22 10:11:09 +10:00
|
|
|
to libinput's device list, i.e. before the @ref
|
|
|
|
|
LIBINPUT_EVENT_DEVICE_ADDED event is generated.
|
|
|
|
|
|
|
|
|
|
The following udev properties are supported:
|
|
|
|
|
<dl>
|
|
|
|
|
<dt>LIBINPUT_CALIBRATION_MATRIX</dt>
|
|
|
|
|
<dd>Sets the calibration matrix, see
|
|
|
|
|
libinput_device_config_calibration_get_default_matrix(). If unset,
|
2015-02-26 18:43:01 +10:00
|
|
|
defaults to the identity matrix.
|
|
|
|
|
|
|
|
|
|
The udev property is parsed as 6 floating point numbers separated by a
|
|
|
|
|
single space each (scanf(3) format "%f %f %f %f %f %f").
|
|
|
|
|
The 6 values represent the first two rows of the calibration matrix as
|
|
|
|
|
described in libinput_device_config_calibration_set_matrix().
|
|
|
|
|
|
|
|
|
|
Example values are:
|
|
|
|
|
@code
|
|
|
|
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0" # default
|
|
|
|
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 -1 1 1 0 0" # 90 degree clockwise
|
|
|
|
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1" # 180 degree clockwise
|
|
|
|
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1" # 270 degree clockwise
|
|
|
|
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 1 0 0" # reflect along y axis
|
|
|
|
|
@endcode
|
|
|
|
|
</dd>
|
2015-02-09 18:45:45 -05:00
|
|
|
<dt>LIBINPUT_DEVICE_GROUP</dt>
|
|
|
|
|
<dd>A string identifying the @ref libinput_device_group for this device. Two
|
|
|
|
|
devices with the same property value are grouped into the same device group,
|
|
|
|
|
the value itself is irrelevant otherwise.
|
|
|
|
|
</dd>
|
2014-12-22 10:11:09 +10:00
|
|
|
<dt>ID_SEAT</dt>
|
|
|
|
|
<dd>Assigns the physical seat for this device. See
|
|
|
|
|
libinput_seat_get_physical_name(). Defaults to "seat0".</dd>
|
2015-02-23 10:28:02 +10:00
|
|
|
<dt>ID_INPUT</dt>
|
|
|
|
|
<dd>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.</dt>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD,
|
|
|
|
|
ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK,
|
|
|
|
|
ID_INPUT_ACCELEROMETER</dt>
|
|
|
|
|
<dd>If any of the above is set, libinput initializes the device as the given
|
2015-04-22 08:16:42 +10:00
|
|
|
type, see @ref udev_device_type. Note that for historical reasons more than
|
|
|
|
|
one of these may be set at any time, libinput will select only one of these
|
|
|
|
|
to determine the device type. To ensure libinput selects the correct device
|
|
|
|
|
type, only set one of them.</dd>
|
2014-12-22 10:11:09 +10:00
|
|
|
<dt>WL_SEAT</dt>
|
|
|
|
|
<dd>Assigns the logical seat for this device. See
|
|
|
|
|
libinput_seat_get_logical_name()
|
|
|
|
|
context. Defaults to "default".</dd>
|
|
|
|
|
<dt>MOUSE_DPI</dt>
|
|
|
|
|
<dd>HW resolution and sampling frequency of a relative pointer device.
|
|
|
|
|
See @ref motion_normalization for details.
|
|
|
|
|
</dd>
|
2015-01-12 08:39:47 +10:00
|
|
|
<dt>MOUSE_WHEEL_CLICK_ANGLE</dt>
|
|
|
|
|
<dd>The angle in degrees for each click on a mouse wheel. See
|
|
|
|
|
libinput_pointer_get_axis_source() for details.
|
|
|
|
|
</dd>
|
2015-04-01 11:03:19 +02:00
|
|
|
<dt>POINTINGSTICK_CONST_ACCEL</dt>
|
|
|
|
|
<dd>A constant (linear) acceleration factor to apply to pointingstick deltas
|
|
|
|
|
to normalize them.
|
2015-04-20 14:29:44 -04:00
|
|
|
<dt>LIBINPUT_MODEL_*</dt>
|
|
|
|
|
<dd><b>This prefix is reserved as private API, do not use.</b>. See @ref
|
|
|
|
|
model_specific_configuration for details.
|
2015-04-01 11:03:19 +02:00
|
|
|
</dd>
|
2014-12-22 10:11:09 +10:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
Below is an example udev rule to assign "seat1" to a device from vendor
|
|
|
|
|
0x012a with the model ID of 0x034b.
|
|
|
|
|
@code
|
|
|
|
|
ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", \
|
|
|
|
|
ENV{ID_MODEL_ID}=="034b", ENV{ID_SEAT}="seat1"
|
|
|
|
|
@endcode
|
|
|
|
|
|
2015-02-23 10:28:02 +10:00
|
|
|
|
|
|
|
|
@section udev_device_type Device type assignment via udev
|
|
|
|
|
|
|
|
|
|
libinput requires the <b>ID_INPUT</b> property to be set on a device,
|
|
|
|
|
otherwise the device will be ignored. In addition, one of <b>
|
|
|
|
|
ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD,
|
|
|
|
|
ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK,
|
|
|
|
|
ID_INPUT_ACCELEROMETER</b> 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 <b>ID_INPUT_TOUCHPAD</b> setting
|
|
|
|
|
and change it into an <b>ID_INPUT_TABLET</b> 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
|
|
|
|
|
|
2015-04-20 14:29:44 -04:00
|
|
|
@section model_specific_configuration Model-specific configuration
|
|
|
|
|
|
|
|
|
|
libinput reserves the property prefix <b>LIBINPUT_MODEL_</b> for
|
|
|
|
|
model-specific configuration. <b>This prefix is reserved as private API, do
|
|
|
|
|
not use.</b>
|
|
|
|
|
|
|
|
|
|
The effect of this property may be to enable or disable certain
|
|
|
|
|
features on a specific device or set of devices, to change configuration
|
|
|
|
|
defaults or any other reason. The effects of setting this property, the
|
|
|
|
|
format of the property and the value of the property are subject to change
|
|
|
|
|
at any time.
|
|
|
|
|
|
2014-12-22 10:11:09 +10:00
|
|
|
*/
|