2014-02-26 19:36:38 +01:00
|
|
|
libinput
|
2014-12-09 13:19:54 +10:00
|
|
|
========
|
2014-02-26 19:36:38 +01:00
|
|
|
|
2018-05-15 14:18:46 +10:00
|
|
|
libinput is a library that provides a full input stack for display servers
|
|
|
|
|
and other applications that need to handle input devices provided by the
|
|
|
|
|
kernel.
|
2014-02-26 19:36:38 +01:00
|
|
|
|
2018-05-15 14:18:46 +10:00
|
|
|
libinput provides device detection, event handling 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
|
|
|
|
|
relative pointer events from touchpads, pointer acceleration, etc.
|
2015-05-28 08:04:42 +10:00
|
|
|
|
2015-05-28 09:33:07 +10:00
|
|
|
Architecture
|
|
|
|
|
------------
|
|
|
|
|
|
2018-05-15 14:18:46 +10:00
|
|
|
libinput is not used directly by applications. Think of it more as a device
|
|
|
|
|
driver than an application library. It is used by the xf86-input-libinput
|
|
|
|
|
X.Org driver or Wayland compositors. The typical software stack for a system
|
|
|
|
|
running Wayland is:
|
2015-05-28 09:33:07 +10:00
|
|
|
|
|
|
|
|
@dotfile libinput-stack-wayland.gv
|
|
|
|
|
|
2018-05-15 14:18:46 +10:00
|
|
|
The Wayland compositor may be Weston, mutter, KWin, etc. Note that
|
2015-05-28 09:33:07 +10:00
|
|
|
Wayland encourages the use of toolkits, so the Wayland client (your
|
|
|
|
|
application) does not usually talk directly to the compositor but rather
|
2018-05-15 14:18:46 +10:00
|
|
|
employs a toolkit (e.g. GTK) to do so. The Wayland client does not know
|
|
|
|
|
whether libinput is in use.
|
2015-05-28 09:33:07 +10:00
|
|
|
|
|
|
|
|
The simplified software stack for a system running X.Org is:
|
|
|
|
|
|
|
|
|
|
@dotfile libinput-stack-xorg.gv
|
|
|
|
|
|
2018-05-15 14:18:46 +10:00
|
|
|
libinput is not employed directly by the X server but by the
|
|
|
|
|
xf86-input-libinput driver instead. That driver is loaded by the server
|
|
|
|
|
on demand, depending on the xorg.conf.d configuration snippets. The X client
|
|
|
|
|
does not know whether libinput is in use.
|
2015-05-28 09:33:07 +10:00
|
|
|
|
2015-05-28 08:04:42 +10:00
|
|
|
Source code
|
|
|
|
|
-----------
|
2014-02-26 19:36:38 +01:00
|
|
|
|
|
|
|
|
The source code of libinput can be found at:
|
2018-06-05 11:07:16 +01:00
|
|
|
https://gitlab.freedesktop.org/libinput/libinput
|
2013-11-10 17:55:40 +01:00
|
|
|
|
2015-05-28 08:04:42 +10:00
|
|
|
For a list of current and past releases visit:
|
2018-06-05 11:07:16 +01:00
|
|
|
https://www.freedesktop.org/wiki/Software/libinput/
|
2014-12-09 12:58:04 +10:00
|
|
|
|
2016-08-09 10:25:22 +10:00
|
|
|
Build instructions:
|
2018-06-05 11:07:16 +01:00
|
|
|
https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
|
2016-08-09 10:25:22 +10:00
|
|
|
|
2015-05-28 08:04:42 +10:00
|
|
|
Reporting Bugs
|
|
|
|
|
--------------
|
|
|
|
|
|
2018-06-05 11:07:16 +01:00
|
|
|
Bugs can be filed on freedesktop.org GitLab:
|
|
|
|
|
https://gitlab.freedesktop.org/libinput/libinput/issues/
|
2014-12-09 12:58:04 +10:00
|
|
|
|
2018-03-01 12:19:44 +10:00
|
|
|
Where possible, please provide the `libinput record` output
|
|
|
|
|
of the input device and/or the event sequence in question.
|
2015-05-28 08:04:42 +10:00
|
|
|
|
2015-07-30 11:11:12 +10:00
|
|
|
See @ref reporting_bugs for more info.
|
|
|
|
|
|
2015-05-28 08:04:42 +10:00
|
|
|
Documentation
|
|
|
|
|
-------------
|
|
|
|
|
|
2018-06-05 11:07:16 +01:00
|
|
|
- Developer API documentation: https://wayland.freedesktop.org/libinput/doc/latest/modules.html
|
2017-07-03 13:43:21 +10:00
|
|
|
- High-level documentation about libinput's features:
|
2018-06-05 11:07:16 +01:00
|
|
|
https://wayland.freedesktop.org/libinput/doc/latest/pages.html
|
2017-07-03 13:43:21 +10:00
|
|
|
- Build instructions:
|
2018-06-05 11:07:16 +01:00
|
|
|
https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
|
2017-07-03 13:43:21 +10:00
|
|
|
- Documentation for previous versions of libinput: https://wayland.freedesktop.org/libinput/doc/
|
2015-05-28 08:04:42 +10:00
|
|
|
|
2016-08-01 13:39:34 +10:00
|
|
|
Examples of how to use libinput are the debugging tools in the libinput
|
|
|
|
|
repository. Developers are encouraged to look at those tools for a
|
|
|
|
|
real-world (yet simple) example on how to use libinput.
|
|
|
|
|
|
2018-06-05 11:07:16 +01:00
|
|
|
- A commandline debugging tool: https://gitlab.freedesktop.org/libinput/libinput/tree/master/tools/libinput-debug-events.c
|
|
|
|
|
- A GTK application that draws cursor/touch/tablet positions: https://gitlab.freedesktop.org/libinput/libinput/tree/master/tools/libinput-debug-gui.c
|
2016-08-01 13:39:34 +10:00
|
|
|
|
2015-05-28 08:04:42 +10:00
|
|
|
License
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
libinput is licensed under the MIT license.
|
|
|
|
|
|
2015-06-11 12:09:18 +10:00
|
|
|
> Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
> copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
> to deal in the Software without restriction, including without limitation
|
|
|
|
|
> the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
> and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
> Software is furnished to do so, subject to the following conditions: [...]
|
2015-05-28 08:04:42 +10:00
|
|
|
|
2018-06-05 11:07:16 +01:00
|
|
|
See the [COPYING](https://gitlab.freedesktop.org/libinput/libinput/tree/master/COPYING)
|
2015-05-28 08:04:42 +10:00
|
|
|
file for the full license information.
|