Commit graph

461 commits

Author SHA1 Message Date
Peter Hutterer
f617b414fb Drop the Signed-off-by requirement
We've had this for roughly 10y now and it's value is dubious. Most of
xorg no longer requires, mesa accepts but doesn't require it, most of GNOME
doesn't accept it and neither does systemd.

Let's drop the requirement.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-07-21 09:08:46 +10:00
Peter Hutterer
b39145e468 doc/user: quirks are available, not supported
This is a bit nitpicky but let's call the current quirks merely
"available" rather than "supported" since quirks should never be seen as
supported API.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-29 03:32:05 +00:00
Peter Hutterer
a88d107c0d doc/user: update the udev rule to handle bind/unbind events
Summary: we expect add, change or remove but kernel 4.12 added bind and
unbind. These events were previously discarded by udevd. Our rules should
handle any event *but* remove, so update as suggested in the announce email
linked below.

For a longer explanation, see the system 247rc2 announcement
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045570.ht

See cd37dcfa66 where we did this already
for the udev rules we use ourselves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-15 03:31:30 +00:00
Peter Hutterer
65c71fd6b4 doc/user: move ignoring devices to separate page
This is way too hidden to the point where i couldn't find it for quite a
while despite knowing it exists. Move it to an entry under
troubleshooting.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-12 13:50:25 +00:00
Simon Ser
57a2339779 doc/user/timestamps: document which clock is used
Document that all timestamps are given in the CLOCK_MONOTONIC
domain.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-05-09 11:18:23 +02:00
Peter Hutterer
d3481c8807 evdev: if a device's rotation is around 180 degrees, flip the wheel
For a device used upside-down, make sure the wheels correspond to the
new physical directions. There's a grace range of 20 degrees either way
since that seems like it makes sense.

For 90 degree rotation (or 270 degree) the wheel is left as-is, the
heuristics to guess what angle we want in this case is not clear enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-27 13:15:14 +10:00
Peter Hutterer
8e34037dcd doc/user: add a section on natural scrolling
Just for completeness, turns out we were missing that one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-18 16:54:57 +10:00
Peter Hutterer
7073a39ec0 doc/user: fix documentation for rotation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-18 16:54:57 +10:00
Peter Hutterer
7ae3713a77 doc/user: the CI uses FEDORA_PACKAGES, not FEDORA_RPMS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-04 08:56:47 +10:00
Tobias Bengfort
1843a2dd0f doc/user: fix tap in palm exclusion zone
See 211bed2c25 and
79139ebcd1

Signed-off-by: Tobias Bengfort <tobias.bengfort@posteo.de>
2023-03-17 12:23:59 +01:00
Yinon Burgansky
93135c2012 filter: add scroll movement type to the custom acceleration profile
Adds a dedicated scroll movement type to the custom acceleration profile.
Supported by physical mouse and touchpad.
Other profiles remain the same by using the same unaccelerated filter for the scroll filter.

Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
2023-02-24 13:01:34 +02:00
José Expósito
f668e827e4 doc/user: fix trackpoint quirks path
Fix a small typo in the file name.

Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/851
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-01-23 18:44:59 +00:00
Peter Hutterer
bf2e8a406e doc/user: fix sphinx warning
WARNING: extlinks: Sphinx-6.0 will require a caption string to contain
exactly one '%s' and all other '%' need to be escaped as '%%'.

Well, let's do that then!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-17 12:29:25 +10:00
Yinon Burgansky
5324f425a1 Introduce custom acceleration profile
The custom acceleration profile allow the user to define custom
acceleration functions for each movement type per device, giving
full control over accelerations behavior at different speeds.

This commit introduces 2 movement types which corresponds to the
2 profiles currently in use by libinput.

regular filter is Motion type.
constant filter is Fallback type.

This allows possible expansion of new movement types for the
different devices.

The custom pointer acceleration profile gives the user full control over the
acceleration behavior at different speeds.
The user needs to provide a custom acceleration function f(x) where
the x-axis is the device speed and the y-axis is the pointer speed.

The user should take into account the native device dpi and screen dpi in
order to achieve the desired behavior/feel of the acceleration.

The custom acceleration function is defined using n points which are spaced
uniformly along the x-axis, starting from 0 and continuing in constant steps.
There by the points defining the custom function are:
(0 * step, f[0]), (1 * step, f[1]), ..., ((n-1) * step, f[n-1])
where f is a list of n unitless values defining the acceleration
factor for each velocity.
When a velocity value does not lie exactly on those points, a linear
interpolation of the two closest points will be calculated.
When a velocity value is greater than the max point defined, a linear
extrapolation of the two biggest points will be calculated.

Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-17 01:46:17 +00:00
Peter Hutterer
ee3330491d doc/api: set HAVE_DOT to YES
dot is required in meson.build, so we can hardcoded it here

Fixes: libinput/build/doc/api/libinput.h:4087: warning: ignoring \dot command because HAVE_DOT is not set

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-17 10:54:10 +10:00
José Expósito
1d7172488d quirks: touchpad: add ModelPressurePad
Unlike in traditional touchpads, whose pressure value equals contact
size, on pressure pads pressure is a real physical axis.

We don't take advantage of the pressure information reported by
pressure pads yet, so we disable it to avoid errors.

Add a new model quirk for pressure pads instead of disabling
ABS_MT_PRESSURE and ABS_PRESSURE.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-01-16 19:22:04 +01:00
Peter Hutterer
69fe6f37cd doc/user: document the new list-kernel-devices tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-09 13:16:38 +10:00
Peter Hutterer
a7e4cbc212 quirks: allow overriding of AttrEventCode and AttrInputProp
This switches the quirk from AttrEventCodeEnable/Disable to just
AttrEventCode with a +/- prefix for each entry.
This switches the quirk from AttrInputPropEnable/Disable to just
AttrInputProp with a +/- prefix for each entry.

Previously, both event codes and input props would only apply the
last-matching section entry for a device. Furthermore, an earlier Disable entry
would take precedence over a later Enable entry. For example, a set of
sections with these lines *should* enable left, right and middle:

  [first]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;BTN_MIDDLE

  [second]
  AttrEventCodeDisable=BTN_RIGHT

  [third]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;

Alas: the first line was effectively ignored (quirks only returned the
last-matching one, i.e. the one from "third"). And due to implementation
details in evdev.c, the Disable attribute was processed after Enable,
i.e. the device was enabled for left + right and then disabled for
right. As a result, the device only had BTN_LEFT enabled.

Fix this by changing the attribute to carry both enable/disable
information and merging the commands together.

Internally, all quirks matching a device are simply ref'd into an array
in the struct quirks. The applied value is simply the last entry in the
array corresponding to our quirk.

For AttrEventCode and AttrInputProp instead do this:
- switch them to a tuple with the code as first entry and a boolean
  enable/disable as second entry
- if the struct quirk already has an entry for either, append the more
  recent one to the existing entry (instead of creating a new entry in
  the array). This way we have all entries that match and in-order of
  precedence - i.e. we can process them left-to-right to end up
  with the right state.

Fixes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/821

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-28 08:25:41 +10:00
Peter Hutterer
703ecb200c Remove trailing whitespaces in the tree
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
5db44d9b68 doc/user: explicitly specify language as en
Unlikely we'll ever have the docs fully translated (or translated at
all...) anyway.

Fixes "WARNING: Invalid configuration value found: 'language = None'.
Update your configuration to a valid language code. Falling back to 'en'
(English)."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-22 14:26:44 +10:00
Peter Hutterer
91610165d9 doc/user: minor rewording of the pointer accel profile list
This just makes it easier to add new profiles to the list without ending
up with a word salad.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-07-15 10:47:13 +10:00
Alexander Courtis
e0813f4825 AttrLidSwitchReliability quirk default unreliable->reliable 2022-04-26 01:55:22 +00:00
Peter Hutterer
3d064a07f8 doc/user: add a page to troubleshoot right-click Clickpads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 23:25:26 +00:00
Peter Hutterer
423bb6455f meson: replace a meson.source_root() with the explicit directory
Removes the warning that source_root() has been deprecated since 0.56.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 21:41:58 +00:00
Peter Hutterer
f917661980 meson: fix a meson warning
run_command() wants a check kwarg now:

WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 21:41:58 +00:00
pudiva chip líquida
1f1ddbc6df touchpad: new option dwtp (disable-while-trackpointing)
Add option to control whether the touchpad should be disabled while the
trackpoint is in use.

Fix #731

Signed-off-by: pudiva chip líquida <pudiva@skylittlesystem.org>
2022-03-08 01:33:40 +00:00
José Expósito
dc86d66a32 doc/user: clarify fork visibility
Clarify that when forking libinput the public visibility level should be
selected. Otherwise, CI pipelines will fail on merge requests.

Also, update the fork URL.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-02-14 19:30:34 +01:00
Peter Hutterer
6914b41de5 doc: correct the documentation for reporting trackpoint bugs
libinput measure trackpoint-range was removed in 1.12

Fixes #734

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-02-11 07:45:40 +00:00
José Expósito
e9ccd4f402 doc: document disambiguation between two finger pinch and scroll
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-01-27 08:35:30 +01:00
Peter Hutterer
00e0c17688 doc/user: write an article explaining the different contexts
This is a common question I need to answer, let's make this a link I can
copy/paste instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-12-13 10:35:24 +10:00
José Expósito
556e4114b8 doc/user: fix broken link to "Observations on trackpoint input data"
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-11-28 13:49:14 +01:00
Peter Hutterer
86698c8184 doc/user: add an example udev rule for LIBINPUT_IGNORE_DEVICE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-16 06:47:48 +00:00
Peter Hutterer
3cb39abe9b doc/user: expand the udev rules for better readability
Split it over multiple lines and use fake cat command to show where that
rule could live.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-16 06:47:48 +00:00
José Expósito
be3c09bc15 doc/user: fix broken link to systemd 60-evdev.hwdb
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-10-30 12:10:10 +02:00
José Expósito
5bda716ebf fallback: hires scroll heuristics for buggy devices
Some devices might announce support for high-resolution scroll wheel
by enabling REL_WHEEL_HI_RES and/or REL_HWHEEL_HI_RES but never send
a high-resolution scroll event.

When the first low-resolution scroll event is received without any
previous high-resolution event, print a kernel bug warning and start
emulating high-resolution scroll events.

Fix #668

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-09-27 22:43:22 +00:00
José Expósito
1d6c38782f doc: add missing literal blocks in contributing
Add missing literal blocks in the section "Failed pipeline errors"
introduced in 140b4b7853.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-09-06 08:42:28 +02:00
Peter Hutterer
6bb02aaf30 High-resolution scroll wheel support
Starting with kernel v5.0 two new axes are available for high-resolution wheel
scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in
fractions of 120 where each multiple of 120 amounts to one logical scroll
event. Fractions of 120 indicate a wheel movement less than one detent.

This commit adds a new API for scroll events. Three new event types that encode
the axis source in the event type name and a new API to get a normalized-to-120
value that also used by Windows and the kernel (each multiple of 120 represents
a logical scroll click).

This addresses a main shortcoming with the existing API - it was unreliable to
calculate the click angle based on the axis value+discrete events and thus any
caller using the axis value alone would be left with some ambiguity. With the
v120 API it's now possible to (usually) calculate the click angle, but more
importantly it provides the simplest hw-independent way of scrolling by a
click or a fraction of a click.

A new event type is required, the only way to integrate the v120 value
otherwise was to start sending events with a discrete value of 0. This
would break existing xf86-input-libinput (divide by zero, fixed in 0.28.2) and
weston (general confusion). mutter, kwin are unaffected.

With the new API, the old POINTER_AXIS event are deprecated - callers should use
the new API where available and discard any POINTER_AXIS events.

Notable: REL_WHEEL/REL_HWHEEL are emulated by the kernel but there's no
guarantee that they'll come every accumulated 120 values, e.g. Logitech mice
often send events that don't add up to 120 per detent.

We use the kernel's wheel click emulation instead of doing our own.

libinput guarantees high-resolution events even on pre-5.0 kernels.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-08-31 08:45:01 +02:00
José Expósito
375618b81b meson.build: use the / operator instead of join_paths
Starting with meson v0.49.0, the "/" operator can be used instead of
join_paths.

Update meson to v0.49.0 and remove all calls to join_paths.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-08-03 20:00:37 +02:00
José Expósito
140b4b7853 doc: add common failed pipeline errors
Add a section in the contributing documentation with common pipeline
errors and how to fix them and point to this page when the CI fails.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-07-30 05:21:59 +00:00
Quytelda Kahja
e6c4b1d16e quirks: Add tablet smoothing attribute.
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/512 disables
input smoothing for AES devices. However, some AES devices produce
segmented/wobbly curves without smoothing. This change introduces an
`AttrTabletSmoothing` boolean property, which overrides the default smoothing
behavior.

See #632

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
2021-07-28 23:53:36 +00:00
Peter Hutterer
ad239327c0 doc/user: move the hold gesture section up to the others
Better structuring this way: pinch, swipe, hold, then other comments

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-27 05:20:45 +00:00
Peter Hutterer
67405c2790 doc/user: fix the line alignments for the hold gesture tables
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-27 05:20:45 +00:00
Andrea Ippolito
967b9d3e45 doc/user: make "verifying install" command portable
According to the linker man page libraries are searched in the following paths:
LD_LIBRARY_PATH environment variable
Paths in the cache file /etc/ld.so.cache
/lib, /usr/lib, /lib64 and /usr/lib64
As we are not using LD_LIBRARY_PATH, we can rely on ldconfig as a fairly portable solution because it "creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib)".

Tested on fedora 34, manjaro 2021.07, kubuntu 21.04

Signed-off-by: Andrea Ippolito <andrea.ippo@gmail.com>
2021-07-26 12:35:33 +02:00
José Expósito
8aed8b6df6 doc: add touchpad gestures state machine diagram
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-06-09 22:12:35 +00:00
Peter Hutterer
38e2a434c5 doc: add docs for hold gestures
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-09 13:12:59 +10:00
Peter Hutterer
c96d414fdc doc: note that gestures may be cancelled
This has been in place forever, so let's note it in the docs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-09 13:01:26 +10:00
Peter Hutterer
d09cc9db00 doc/user: #wayland is now on oftc
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-25 20:19:36 +10:00
satrmb
0cb570addd evdev: restart debouncing timers after every event
Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2021-05-19 12:24:59 +02:00
Nicolas Fella
20b2123fbc doc/user: Add instructions for using with CMake
CMake provides a nice way to use libinput, let the world now.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-05-04 21:16:55 +02:00
Peter Hutterer
354df8bce9 Change various references to the master branch to main
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-29 01:31:03 +00:00