1
0

ignoring-devices.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. .. _ignoring_devices:
  2. ==============================================================================
  3. Ignoring specific devices
  4. ==============================================================================
  5. If a device has the **LIBINPUT_IGNORE_DEVICE** udev property set to any
  6. value but "0", that device is not initialized by libinput.
  7. For a context created with **libinput_udev_create_context()**, the device is
  8. silently ignored and never shows up. If the device is added with
  9. **libinput_path_add_device()** to a context created with
  10. **libinput_path_create_context()**, adding the device will fail and return NULL
  11. (see that function's documentation for more
  12. information).
  13. If the property value is exactly "0", then the property is considered unset
  14. and libinput initializes the device normally.
  15. This property should be used for devices that are correctly detected as
  16. input devices (see :ref:`udev_device_type`) but that should not be used by
  17. libinput. It is recommended that devices that should not be handled as input
  18. devices at all unset the **ID_INPUT** and related properties instead. The
  19. **LIBINPUT_IGNORE_DEVICE** property signals that only libinput should
  20. ignore this device but other parts of the stack (if any) should continue
  21. treating this device normally.
  22. Below is an example udev rule to assign **LIBINPUT_IGNORE_DEVICE** to the
  23. device with the vendor/model ID of ``012a``/``034b``. ::
  24. $ cat /etc/udev/rules.d/99-ignore-my-device.rules
  25. ACTION!="remove", KERNEL=="event[0-9]*", \
  26. ENV{ID_VENDOR_ID}=="012a", \
  27. ENV{ID_MODEL_ID}=="034b", \
  28. ENV{LIBINPUT_IGNORE_DEVICE}="1"
  29. See :ref:`udev_config` for more details on libinput's udev properties.