Commit graph

28 commits

Author SHA1 Message Date
Peter Hutterer
4ef14e14e4 Add an API for configurable eraser button behavior
This adds the public API to configure an eraser button on a tablet tool
to emulate a normal button. In DEFAULT mode the eraser button will
simply do whatever it does by default (i.e. toggle to eraser).
In BUTTON mode the eraser button will be converted to a regular tool
button event, with libinput handling the underlying proximity event
madness.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1218>
2025-06-18 19:38:14 +10:00
Peter Hutterer
4ac52b4f1b tools: support sendevents mode in debug-events
Disabling sendevents was already supported via an fnmatch() and
--disable-sendevents but to test things like disabling on an external
mouse, let's expose this option too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1152>
2025-03-13 05:17:07 +00:00
Peter Hutterer
cf5b7bee01 Add tablet area configuration
This adds the configuration option to define a rectangle that serves as
an input area on external tablets such as an Intuos.

The intention behind this is to make this input area behave as if it was
the only physical input area on this tablet with libinput emulating
proximity events as required for where the tools moves in and out
of this area.

This could also be achieved with the existing calibration setting but
area configuration is not calibration and we don't want to expose other
side-effects of the matrix (e.g. scaling and rotation) for these
devices.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1013>
2024-11-05 12:10:48 +10:00
Peter Hutterer
86915213c8 tools: sort the options in debug-events match page
We now have enough config options that having them unsorted makes it
hard to find the right option.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1075>
2024-11-04 15:48:49 +10:00
Peter Hutterer
a4ff6d5d0b tools: add --set-calibration to the debug-events man page
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1051>
2024-09-20 21:06:15 +10:00
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
Peter Hutterer
1725b7d606 Add support for --set-pressure-range to the debugging tools
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1009>
2024-06-10 15:09:19 +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
Peter Hutterer
bee70901ec tools: add rotation support to debug-events and debug-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-27 13:15:14 +10: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
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
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
Peter Hutterer
2059a015ae tools: fix typo in debug-events man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-31 17:28:15 +10:00
Peter Hutterer
490131ff61 tools: make debug-events accept multiple device nodes
For interaction between devices it's necessary to look at more than one device
at a time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-26 00:34:08 +00:00
Peter Hutterer
63f9923013 Add a scroll button lock feature
Scroll button locking is an accessibility feature. When enabled, the scroll
button does not need to be held down, the first click holds it logically down,
to be released on the second click of that same button.

This is implemented as simple event filter, so we still get the same behavior
from the emulated logical button, i.e. a physical double click results in a
single logical click of that button provided no scrolling was triggered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 12:21:41 +10:00
Ronan Pigott
ac007401bb tools: fix typo in debug-events 2019-08-13 15:26:53 -07:00
Peter Hutterer
829673901c tools: add --apply-to to debug-events and debug-gui
All configuration options will only apply to the device with the given match
mattern. This makes it easier to test things like tapping on one device but
not on the other.

Exception is the sendevents pattern which applies independently.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-27 11:13:48 +10:00
Peter Hutterer
4e469291b1 tools: let debug-events take a device path
This is the most common use-case other than "all from udev", so let's just
parse a device path correctly without requiring --device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
33162632cb Revert "Expose a custom acceleration profile"
This looked good on paper but clearly no-one (including myself) ever tested this
in a real-life situation or they would've noticed that the constant factor is
missing, causing a segfault on the first two-finger scroll event, touchpad
gesture or button scrolling.

Adding the constant factor makes the API much worse and the benefit is
unclear, so out of the window it goes. We can revisit this for libinput 1.12
but this isn't going to make the next release.

This reverts commit d8bd650540.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 12:15:25 +10:00
Peter Hutterer
d8bd650540 Expose a custom acceleration profile
This adds a third profile to the available profiles to map device-specific
speed to an acceleration factor, fully defined by the caller.

There has been a consistent call for different acceleration profiles in
libinput, but very little specifics in what actually needs to be changed.
"faster horses" and whatnot (some notable exceptions in e.g. bug 101139).
Attempts to change the actual acceleration function will likely break things
for others.

This approach opens up the profile itself to a user-specific acceleration
curve. A caller can set an acceleration curve by defining a number of points
on that curve to map input speed to an output factor. That factor is applied
to the input delta.

libinput does relatively little besides mapping the deltas to the
device-specific speed, querying the curve for that speed and applying that
factor. The curve is device-specific, the input speed is in device units/ms.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-26 14:48:37 +10:00
Peter Hutterer
a59ce1c0c4 tools: fix man page for debug-events
click method is 'buttonareas', not just 'buttons'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-06 08:18:33 +10:00
Peter Hutterer
13c9ef07a2 man: add --enable-middlebutton to debug-events man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-15 13:33:11 +10:00
Peter Hutterer
5252fa5d88 tools: add --disable-sendevents option to the debug-events/debug-gui tools
Makes it possible to debug issues with sendevents.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-18 17:00:57 +10:00
Peter Hutterer
945122c691 tools: tidy up the libinput man pages again
Make the libinput page more generic but suitable for short attention spans and
most importantly, point to the xf86-input-libinput man page in a more obvious
manner since we're now shadowing that.

The rest of the man pages have punctuation and formatting cleanups only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:04:11 +10:00
Peter Hutterer
5bba2dbb3f tools: add the libinput version to the man pages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-03 11:09:03 +10:00
Peter Hutterer
411aaa8f92 Rename man pages to .1 suffix for meson's benefit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04 13:49:37 +10:00
Peter Hutterer
60d3b6a8ed tools: update man page for debug-events --show-keycodes flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:52:31 +10:00
Peter Hutterer
8e667070ff tools: ship the event-debug tool as an installed libinput-debug-events tool
Rebuild the same binary but without the special LDFLAG. The event-debug tool
is left as-is to allow for easy debugging with gdb, the new tool is now
libtool-enabled and can't be run directly in gdb without installing it first.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-04-30 19:20:49 +10:00