Jump to content

User:ScotXW/libinput

From Wikipedia, the free encyclopedia
libinput
Original author(s)Jonas Ådahl, Hans de Goede, Peter Hutterer et al.
Preview release
1.5.1
Written inC
PlatformWindows, Linux, OS X, Android(beta)
LicenseMIT License
Websitefreedesktop.org/…/libinput
libinput was created to consolidate the input stack across multiple Wayland compositors.

libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices.

It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code the user of libinput need to provide the common set of functionality that users expect. Input event processing includes scaling touch coordinates, generating pointer events from touchpads, pointer acceleration, etc.

An incomplete list of features: middle mouse button emulation, middle-button scrolling on tracksticks, software button areas for clickpads, clickfinger-like behavior, two-finger and edge scrolling, touchpad gestures, device-specific pointer acceleration, touchpad accidental palm and thumb detection, multi-finger tapping.

With Wayland aiming to be the core of the future graphics stack, an input system was needed for Wayland compositors. A single input stack has the advantage that we don't have different bugs and features in every compositor.

The current stack used in Xorg is a conglomerate of independent pieces. The two most common drivers, evdev and synaptics, cannot talk to each other and have accumulated significant amount of cruft. The drivers are effectively untestable. Changing the drivers to be compatible with Wayland compositors is effectively a rewrite.

So we needed a new solution, and libinput is that solution. It handles all input devices and configuration. With the xf86-input-libinput driver it can be used as the backend on X devices.

  • X.Org Server 1.18 shiped with the modesetting video driver (xf86-video-modesetting) integrated into the server for basic video functionality.
  • For X.Org Server 1.20 we want to integrate the libinput-wrapper input driver (xf86-input-libinput) into the server as well.

Libinput handles input devices for multiple Wayland compositors and also provides a generic X.Org Server input driver. It aims to provide one implementation for multiple Wayland compositors with a common way to handle input events while minimizing the amount of custom input code compositors need to include. libinput provides device detection (via udev), device handling, input device event processing and abstraction.[1]

Version 1.0 of libinput followed version 0.21, and included support for tablets, button sets and touchpad gestures. This version will maintain stable API/ABI.[2]

As GNOME/GTK+ and KDE Frameworks 5[3] have mainlined the required changes, Fedora 22 will replace X.Org's evdev and Synaptics drivers with libinput.[4]

With version 1.16, the X.Org Server obtained support for the libinput library in form of a wrapper called xf86-input-libinput.[5][6]

Rationale

[edit]

The original code if libinput started as part of Weston. One rationale of taking the code out of Weston and making it the libinput library was to avoid code duplication as well as different bugs and features in the Wayland compositors.

The other rationale was to avoid of a huge testing matrix.

Documentation

[edit]

The libinput source code tarballs contain documentation written by the developers themselves! Unpacked Lininput release 1.5.3 comprises of 11 MB with the doc-directory taking up 7 MB.

High-level documentation is maintained at: https://wayland.freedesktop.org/libinput/doc/latest/pages.html

Additionally a couple of presentations/talks have been held at several X.Org Developer’s Conferences and there are also some blog entries.

udev

[edit]

libinput relies on udev to do device detection and support for hot-plugging. libinput maintains its own set of udev rules in the directory udev.

Adoption

[edit]

Wayland

[edit]

Most – if not all – available Wayland compositors make use of libinput. See List_of_display_servers#Wayland.

X11

[edit]
  • X.Org Server 1.16 (released 17 July 2014) obtained support for the libinput library in form of a wrapper called xf86-input-libinput.[7]
  • X.Org Server 1.18 shipped with the mode setting video driver (xf86-video-modesetting) integrated into the server for basic video functionality.
  • For X.Org Server 1.20 (to be released in 2017) we want to integrate the libinput-wrapper input driver (xf86-input-libinput) into the server as well.
  • Xephyr: ?

Other

[edit]

History

[edit]

The Weston code for handling input devices (keyboards, pointers, touch screens, etc.) was split into its own separate library, called libinput, for which support was first merged in Weston 1.5.[8][9]

Release history

[edit]
Version Date Size1
(KiB)
Release notes
0.1.0 2014-02-26 334 0.1
0.2.0 2014-05-22 356 0.2
0.3.0 2014-06-09 377 0.3
0.4.0 2014-06-25 385 0.4
0.5.0 2014-07-22 391 0.5
0.6.0 2014-09-11 399 0.6
0.7.0 2014-12-05 430 0.7
0.8.0 2015-01-15 493 0.8
0.9.0 2015-01-30 499 0.9
0.10.0 2015-02-06 501 0.10
0.11.0 2015-02-23 513 0.11
0.12.0 2015-03-09 526 0.12 As of the 0.12 release, the API/ABI is stable.
0.13.0 2015-03-24 528 0.13
0.14.0 2015-04-21 556 0.14
0.14.1 2015-04-21 555 0.14.1
0.15.0 2015-05-05 560 0.15
0.16.0 2015-06-01 604 0.16
0.17.0 2015-06-04 608 0.17
0.18.0 2015-06-22 609 0.18
0.19.0 2015-07-06 613 0.19
0.20.0 2015-07-16 632 0.20
0.21.0 2015-08-04 643 0.21
0.99.1 2015-08-21 761 0.99.1
1.0 2015-08-26 767 1.0
1.0.1 2015-09-03 781 1.0.1
1.0.2 2015-10-21 780 1.0.2
1.1 2015-10-26 784 1.1
1.1.1 2015-11-15 773 1.1.1
1.1.2 2015-12-08 799 1.1.2
1.1.3 2015-12-15 797 1.1.3
1.1.4 2015-12-22 800 1.1.4
1.1.5 2016-01-25 788 1.1.5
1.1.6 2016-02-05 802 1.1.6
1.1.7 2016-02-10 805 1.1.7
1.1.8 2016-02-18 789 1.1.8
1.2 2016-02-23 846 1.2
1.2.1 2016-02-28 843 1.2.1
1.2.2 2016-03-15 837 1.2.2
1.2.3 2016-04-11 840 1.2.3
1.2.4 2016-04-19 837 1.2.4
1.3 2016-05-10 858 1.3
1.3.1 2016-05-29 860 1.3.1
1.3.2 2016-06-16 864 1.3.2
1.3.3 2016-06-24 861 1.3.3
1.4 2016-07-18 880 1.4
1.4.1 2016-08-05 877 1.4.1
1.4.2 2016-08-30 880 1.4.2
1.4.3 2016-09-23 878 1.4.3
1.5 2016-09-14 889 1.5
1.5.1 2016-11-11 905 1.5.1
1.5.2 2016-11-25 904 1.5.2
1.5.3 2016-12-07 907 1.5.3
1.6 2017-01-19 906 1.6

1 The size refers to the entire software tarred and then packed with xz. Unpacked release 1.5.3 has a size of about 11 MB with the src-directory taking up about 800KiB. The rest is documentation (about 7 MB), tests ( 1.2MB) and other stuff.

References

[edit]
  1. ^ "libinput". Freedesktop.org. Retrieved 21 May 2014.
  2. ^ "libinput: the road to 1.0".
  3. ^ Cite error: The named reference autoref0004 was invoked but never defined (see the help page).
  4. ^ "Libinput now enabled as default xorg driver for F-22 workstation installs".
  5. ^ Hutterer, Peter (24 September 2014). "libinput - a common input stack for Wayland compositors and X.Org drivers". Retrieved 17 April 2016.
  6. ^ de Goede, Hans (1 February 2015). "Replacing xorg input - Drivers with libinput" (PDF). Retrieved 18 April 2016.
  7. ^ "libinput - a common input stack for Wayland compositors and X.Org drivers".
  8. ^ Cite error: The named reference wayland 1.5 was invoked but never defined (see the help page).
  9. ^ Ådahl, Jonas (12 November 2013). "[RFC] Common input device library". Wayland mailing list.
Cite error: A list-defined reference named "XDC2014 libinput" is not used in the content (see the help page).
[edit]