Skip to content
Commits on Source (10)
......@@ -11,6 +11,17 @@ 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.
User documentation
------------------
Documentation explaining features available in libinput is available
[here](https://wayland.freedesktop.org/libinput/doc/latest/pages.html).
This includes the [FAQ](https://wayland.freedesktop.org/libinput/doc/latest/faq.html)
and the instructions on
[reporting bugs](https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html).
Architecture
------------
......
......@@ -220,4 +220,27 @@ The warning has no immediate effect on libinput's behavior but some of the
functionality that relies on the timer may be impeded (e.g. palms are not
detected as they should be).
@section faq_wayland Is libinput required for Wayland?
Technically - no. But for your use-case - probably.
Wayland is a display server communication protocol. libinput is a low-level
library to simplify handling input devices and their events. They have no
direct connection. As a technical analogy, the question is similar to "is
glibc required for HTTP", or (stretching the analogy a bit further) "Is a
pen required to write English". No, it isn't.
You can use libinput without a Wayland compositor, you can
write a Wayland compositor without libinput. Until 2018 the most common use
of libinput is with the X.Org X server through the xf86-input-libinput
driver. As Wayland compositors become more commonplace they will eventually
overtake X.
So why "for your use-case - probably"? All general-purpose Wayland
compositors use libinput for their input stack. Wayland compositors that
are more specialized (e.g. in-vehicle infotainment or IVI) can handle input
devices directly but the compositor you want to use
on your desktop needs an input stack that is more complex. And right now,
libinput is the only input stack that exists for this use-case.
*/
......@@ -35,6 +35,10 @@
- @subpage tablet-support
@page other_devices Other devices
- @subpage switches
@page general General
- @subpage udev_config
......
/**
@page switches Switches
libinput supports a couple of switches. Unlike button events that come in
press and release pairs, switches are usually toggled once and left at the
setting for an extended period of time.
libinput supports the lid and tablet-mode switches. Unlike button events
that come in press and release pairs, switches are usually toggled once and
left at the setting for an extended period of time.
Only some switches are handled by libinput, see @ref libinput_switch for a
list of supported switches. Switch events are exposed to the caller, but
......
......@@ -202,6 +202,35 @@ have captured the bug.
More arguments are available, see the **libinput-record(1)** and
**libinput-replay(1)** man pages.
@subsection libinput-record-autorestart libinput record's autorestart feature
`libinput record` often collects thousands of events per minute. However,
the output of `libinput record` usually needs to be visually inspected
or replayed in realtime on a developer machine. It is thus imperative that
the event log is kept as short as possible.
For bugs that are difficult to reproduce use
`libinput record --autorestart=2 --output-file=recording.yml`.
All events will be recorded to a file named
`recording.yml.<current-date-and-time>` and whenever the device does not
send events for 2 seconds, a new file is created. This helps to keep
individual recordings short.
To use the `--autorestart` option correctly:
- run `libinput record --autorestart=2 --output-file=<somefilename>.yml`.
You may provide a timeout other than 2 if needed.
- use the device to reproduce the bug, pausing frequently for 2s and longer
to rotate the logs
- when the bug triggers, **immediately stop using the device** and wait
several seconds for the log to rotate
- Ctrl+C the `libinput record` process without using the device
again. Attach the **last recording** to the bug report.
If you have to use the recorded device to stop `libinput record` (e.g. to
switch windows), remember that this will cause a new recording to be
created. Thus, attach the **second-to-last recording** to the bug report
because this one contains the bug trigger.
@subsection libinput-record-multiple Recording multiple devices at once
In some cases, an interaction between multiple devices is the cause for a
......@@ -226,7 +255,7 @@ Replaying events is the same as for a single recording:
$ sudo libinput replay touchpad-bug.log
@endverbatim
@subsection libinput-measure Measuring device properties with libinput measure
@section libinput-measure Measuring device properties with libinput measure
The `libinput measure` tool is a multiplexer for various sub-tools that can
measure specific properties on the device. These tools generally measure one
......
project('libinput', 'c', 'cpp',
version : '1.11.2',
version : '1.11.3',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.40.0')
......
......@@ -89,6 +89,10 @@ def create(device):
data = 20
d.enable(libevdev.evbit(evtype, code), data=data)
properties = fetch(evdev, 'properties')
for prop in properties:
d.enable(libevdev.propbit(prop))
uinput = d.create_uinput_device()
return uinput
......
......@@ -267,10 +267,9 @@ tools_open_udev(const char *seat, bool verbose, bool *grab)
goto out;
}
if (verbose) {
libinput_log_set_handler(li, log_handler);
if (verbose)
libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG);
}
if (libinput_udev_assign_seat(li, seat)) {
fprintf(stderr, "Failed to set seat\n");
......
......@@ -175,6 +175,10 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
# HP
##########################################
# HP Chromebook 14
libinput:name:*Cypress APA Trackpad *cyapa*:dmi:*svnHewlett-Packard*:pnFalco*
LIBINPUT_ATTR_PRESSURE_RANGE=12:8
# HP Compaq6910p
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
LIBINPUT_MODEL_HP6910_TOUCHPAD=1
......