Commit graph

480 commits

Author SHA1 Message Date
satrmb
910d59e836 touchpad: add sticky mode to drag-lock
Sticky mode removes the timeout from drag-lock, only a tap ends a drag.
Timeout mode remains available without changes.

Sticky mode is exposed as a new value for the existing drag-lock setting.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1037>
2024-09-05 00:47:47 +00:00
José Expósito
7d849623d5 Fix pre-commit errors
Some files had pre-commit style issues. Fix them.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1036>
2024-09-03 09:51:41 +02:00
Peter Hutterer
6f19267c1e doc/user: fix a typo
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1027>
2024-07-19 10:07:49 +10:00
José Expósito
c201be9b1b doc/user: document ModelTouchpadPhantomClicks quirk
Related https://gitlab.freedesktop.org/libinput/libinput/-/issues/1013

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1023>
2024-07-04 10:11:36 +00:00
Peter Hutterer
82322a4c57 doc/user: document the device quirk MatchFoo statements
Closes #1001

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1016>
2024-06-17 07:58:43 +00:00
Tarcísio Eduardo Moreira Crocomo
46d1fff0b0 touchpad: add clickfinger button map
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/988>
2024-04-09 19:08:17 -03:00
José Expósito
b5b825a7c3 doc/user: Document "Closes" and "Fixes" tags
Describe how the tags should be used. The guidelines for the "Fixes"
tag are taken from the Linux kernel documentation [1][2].

[1] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes
[2] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#describe-changes

Closes: #974
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/978>
2024-02-28 16:59:58 +01:00
Peter Hutterer
0d7b281f49 doc: fix end-of-file in the state machine SVG
Picked up by the pre-commit hook
2024-02-19 12:21:16 +10:00
Peter Hutterer
f46d45a589 doc: drop permissions to 644 for the gesture state machine SVG
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-02-06 11:32:42 +10:00
Peter Hutterer
8079a51b7f doc/user: note the requirement to apply for gitlab fork permissions 2024-02-02 09:51:31 +10:00
Peter Hutterer
4bc27543e9 tablet: add tablet tool pressure range configuration
Add a configuration option to reduce the available hardware range to a
fraction thereof. This is done by copying the absinfo struct for the
pressure value and adjusting that copy's minimum/maximum value for
scaling into the target normalized range.

The 1%/5% tip thresholds are kept but pressure offset detection is
disabled if there is a custom pressure range.

Unlike the pressure curve which is implemented in the compositor, the
pressure min/max range needs to be in libinput, primarily because the
tip threshold needs to adjust to any new minimum, allowing for
light touches with a pen without triggering tip down even at a higher
hardware pressure.
2024-01-30 14:29:25 +10:00
José Expósito
802b0e14d0 doc/user: add FAQ about scroll speed
This question showed up in my email and it has been asked in the issue
tracker a few times. Explaining why libinput is not the right place to
implement it for future reference.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-11-07 09:50:29 +01:00
Peter Hutterer
fe3ae87b09 touchpad: allow a palm pressure threshold of 0 to disable
Where a more generic match assigns a palm threshold to a device, allow
unsetting this by assigning a threshold of zero.

And remove the bug log for palm size threshold of 0 for the same reason.
2023-10-09 07:03:47 +00:00
Peter Hutterer
4b03374d50 doc/user: update the udev rule to handle bind/unbind events (part 2)
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.html

See cd37dcfa66 where we did this already
for the udev rules we use ourselves and
a88d107c0d for the patch where we already
updated parts of the docs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-09-28 08:57:15 +10:00
José Expósito
12bb7547f9 meson: Use the meson setup command
Meson recommends using the `meson setup [options]` command:

    WARNING: Running the setup command as `meson [options]` instead of
    `meson setup [options]` is ambiguous and deprecated.

Update the documentation and CI to use the recommended command.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-09-03 17:01:59 +00:00
José Expósito
8d0f2f5f62 pre-commit: Fix end of files
The new pre-commit hook introduced in commit 53517dccb8 ("Add
pre-commit hooks") found 2 files ending with a double empty line:

    Fix End of Files.............................Failed
      - hook id: end-of-file-fixer
      - exit code: 1
      - files were modified by this hook

Fix this error.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-09-03 17:01:59 +00:00
Peter Hutterer
53517dccb8 Add pre-commit hooks
This ensures a few things are correct before we commit and/or push,
making life a bit easier for both our contributors and our maintainers
since some things should no longer end up in the MRs.

Activate via:
$ pre-commit install
$ pre-commit install --hook-type pre-push

The latter is required for the ci-templates hooks which are pre-push
only.
2023-09-01 09:12:54 +00:00
Bjørn Forsman
3dba00845c tablet: increase pressure offset limit from 20% to 50%
detect_pressure_offset() currently rejects offsets that are greater than
20%. My graphics tablet (Wacom Bamboo Fun) is about 30%. The pen tip is
2 mm. Wacom recommends replacing at 1 mm, which means this isn't worn
out yet and we should instead increase the limit to make these devices
usable.

Without this change a "pen down" event happens simultaneously with the
pen being detected -- about 1 cm above the surface -- and producing
libinput pressure of about 0.30. This means you start drawing "in the
air", without knowing up front where the cursor is going to be.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
2023-08-24 08:04:03 +02:00
Yinon Burgansky
f259cac9ca docs: improve custom pointer acceleration documentation.
- Explain calculation made by the driver.
- Provide detailed example with a plot for a custom function.
- Fix inaccurate explanation of unit values.

Signed-off-by: Yinon Burgansky <yinonburgansky@gmail.com>
2023-08-16 20:13:39 +03:00
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