The tablet tilt range may be set as [-N, M] in which case we assume that
a value of zero is vertical (and thus should result in a libinput tilt
value of zero). Unfortunately some tablets report an even total value
range, e.g. [-64, 63] so zero is not actually the mathematical center of
the axis.
Fix this by bumping the axis maximum so zero becomes the logical center.
All devices we've seen so far have [-A, (A-1)] as range so bumping it by
one makes it symmetric.
Like the input axis, a normalized range has min/max inclusive so we
cannot use the absinfo_range() helper which assumes the max is exclusive.
Reverts parts of 4effe6b1b9
Fixing the range is only required when the output range is not inclusive
of the min/max (such as when mapping an abs axis to a screen width).
Our pressure range is inclusive 0.0 and 1.0, so we want absinfo->maximum
to map to exactly 1.0
This reverts commit a5b6f4009b.
And add a test to make sure the tool we know that has three buttons (Pro
Pen 3) can send all those. Enough to run that test one one compatible
device, no real benefit of running it on all tablet devices.
If a test goes past the tip-down threshold, the proximity timeout does
not trigger. And one can spend a long time trying to debug why the test
fails...
As far as I vaguely remember, these devices' pressure values are correct
enough, it's just the lack of BTN_TOOL_PEN that is the issue so instead
of a proper proximity out, we just send enough data to set the pressure
to below the tip threshold.
If libwacom is disabled or there is no .tablet file in libwacom for this
device yet, default to enabling a left-handed setting. Otherwise the
tablet may not be usable.
See https://github.com/linuxwacom/libwacom/issues/616
The generic quirk introduced in commit d1f274c7 ("quirks: add a
more generic match for the 5288 Synaptics clickpad") affects the
touchpad (with physical buttons) present in the Graviton N15i-K2.
This way users who don't know gitlab much but are most likely reporting
a bug get to use this template and anyone else can remove the
boilerplate and be more free-form and/or prosaic.
When using a touchpad to double click on a QEMU/KVM virtual machine,
fast double taps are filtered by our debouncing code.
Since these are emulated devices and by definition cannot have a stuck
button, let's tag them so we don't enable the debouncing code.
If the button of the physical device is stuck, that's a problem that
needs to be fixed in the host system.
The same device name and broken behavior was found in GNOME Boxes and
Virtual Machine Manager.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Actually libinput is one of the last users of harbor.fd.o, because it uses
an outdated version of vm2c.py. Use the new location of the project,
bump its release, and also bump the kernel version we test while at it.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
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>
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.
Group the LITEST_FOO enum into sections for touchpads, mice, etc. This
makes it easier to find whether a particular device may have a
representation already.
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>
This allows the "Disable while typing" feature to work properly for:
048d:c102 Integrated Technology Express, Inc. ITE Device(8910)
This keyboard was found in the following Lenovo laptops:
* Legion 5 Pro 16ARH7H
* Legion 5 15ARH7H
The quirk for 16ARH7H was added in 94c785a2 (see #933), however
matching by DMI does not work for 15ARH7H, so let's match by
USB VID/PID instead.
https://gitlab.freedesktop.org/libinput/libinput/-/issues/933#note_2099049
This device has a touchpad with uncommon pressure sensitivity which
makes it hard to use out of the box.
Signed-off-by: Brady Norander <bradyn127@protonmail.com>
We need to set the `native` flag:
meson.build:704: WARNING: add_languages is missing native:,
assuming languages are wanted for both host and build.
As documented [1]:
If set to true, the language will be used to compile for the build
machine, if false, for the host machine.
[1] https://mesonbuild.com/Reference-manual_functions.html#add_languages
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
The meson version was `>= 0.49.0` but features from `0.56.0` were used:
meson.build:485: WARNING: Project targets '>= 0.49.0' but uses
feature introduced in '0.56.0': meson.project_source_root.
Update meson's target version to reflect the features used.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
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>
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>
A follow up on commit 65eaabf91f ("tools/record: print the vid/pid
with proper 4 hex digits").
Print the bus name in addition to the bus ID. Only the busses available
in quirks are printed.
Example:
$ sudo libinput record
[...]
# ID: bus 0x0003 (usb) vendor 0x046d product 0x406d version 0x0111
[...]
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
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.
Due to a patch pushed accidentally to main, the `key_count` variable is
uninitialized in the `evdev_log_bug_libinput` code path:
../src/evdev.c:148:12: error: ‘key_count’ may be used uninitialized [-Werror=maybe-uninitialized]
148 | if (key_count > 32) {
| ^
../src/evdev.c: In function ‘evdev_pointer_post_button’:
../src/evdev.c:132:13: note: ‘key_count’ was declared here
132 | int key_count;
| ^~~~~~~~~
Fixes commit bb1e4a493f ("evdev: Log bug when releasing key with count 0")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
libinput keeps an internal key count. It is increased by 1 when the key
is pressed and decreased by one when the key is released.
The count should never be negative, however a user found an issue while
running Sway and hit an assert.
Replace the assert with a log to avoid the crash.
Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/928
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Google Chromebook Redrix (HP Elite Dragonfly) is shipped with a touchpad
from ELAN (ELAN2703:00 04F3:323B) with uncommon pressure parameters
which make moving and tapping not working out of box.
Signed-off-by: Weifeng Liu <weifeng.liu.z@gmail.com>
The range is (max - min + 1) because the kernel range is inclusive min
and max. Let's fix that once and for all with a helper function.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>