Compare commits

...

63 Commits

Author SHA1 Message Date
callmetango
4eb6691efe release 25.0.1
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2026-02-02 18:22:27 +00:00
Tautvydas
868a03004e Revert "drop xorg-libinput.pc"
Apperently we cannot do this, because there are software which uses
xorg-libinput.pc in build system:
* KDE plasma-desktop uses for libinput-properties.h header detection
* LXQT uses for libinput-properties.h

Closes: https://github.com/X11Libre/xf86-input-libinput/issues/25

Signed-off-by: Tautvis <gtautvis@gmail.com>
2026-02-02 17:23:04 +01:00
Enrico Weigelt, metux IT consult
3d80bbef34 drop compat with old inputproto < 2.3.99.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 20:01:38 +01:00
Enrico Weigelt, metux IT consult
8e29361dfd .github: update action version
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-30 17:13:02 +01:00
Enrico Weigelt, metux IT consult
e8f07a1a95 .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-27 14:07:15 +01:00
Enrico Weigelt, metux IT consult
2dba841ff6 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 10:13:10 +01:00
Enrico Weigelt, metux IT consult
4cbd329407 configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:59:40 +01:00
Enrico Weigelt, metux IT consult
80daaadd99 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 18:39:48 +01:00
Enrico Weigelt, metux IT consult
c3aaef48de drop obsolete .editorconfig
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:50:52 +01:00
Enrico Weigelt, metux IT consult
5a94e12c38 configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:31:55 +01:00
Enrico Weigelt, metux IT consult
aa23b2079f drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:49:28 +01:00
Enrico Weigelt, metux IT consult
6b692e3e1b drop obsolete HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:02:35 +01:00
Enrico Weigelt, metux IT consult
87f63feb24 drop xorg-libinput.pc
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:46:55 +01:00
Enrico Weigelt, metux IT consult
dcfbe775cd release 1.5.2
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 14:44:01 +01:00
Enrico Weigelt, metux IT consult
f86600edd0 man: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:45:09 +01:00
Enrico Weigelt, metux IT consult
771cada821 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 11:08:13 +01:00
GermanAizek
d07bc60926 libinput: option tapping by default enabled
This fix helps most laptop users not to change properties in config.

Issue: https://github.com/X11Libre/xf86-input-libinput/issues/6
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
2025-12-15 17:16:01 +01:00
Oleh Nykyforchyn
4f163b3f73 xf86-input-libinput: make Emulate3Buttons a synonym for MiddleEmulation
This patch in intended to ease transition form evdev to libinput as
the primary driver for mice.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-15 17:15:16 +01:00
Enrico Weigelt, metux IT consult
112263280f fix warning on unhandled values
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_TABLET_PAD_KEY' not handled in switch [-Wswitch]
>  2617 |         switch (type) {
>       |         ^~~~~~
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_GESTURE_HOLD_BEGIN' not handled in switch [-Wswitch]
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_GESTURE_HOLD_END' not handled in switch [-Wswitch]

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:15:03 +01:00
Enrico Weigelt, metux IT consult
5d27c689bf fix struct name clash with Xserver SDK
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c: In function 'xf86libinput_set_pressure_range':
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:465:53: warning: declaration of 'range' shadows a global declaration [-Wshadow]
>   465 |                                 const struct range *range)
>       |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~
> In file included from /usr/include/xorg/xf86.h:44,
>                  from /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:36:
> /usr/include/xorg/xf86str.h:110:3: note: shadowed declaration is here
>   110 | } range;
>       |   ^~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:14:55 +01:00
Enrico Weigelt, metux IT consult
8c2a8fa56c disable pointless warnings
Add -Wno-declaration-after-statement for suppressing pointless warnings
on declarations after statement.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:14:48 +01:00
Enrico Weigelt, metux IT consult
ada1d2ed6c util-strings: drop unused str_sanitize()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:14:27 +01:00
Peter Hutterer
0f6cc09321 Add support for the libinput plugin system
This is hardcoded to be enabled from the default paths (/usr/share and
/etc) without any extra paths. If there is a need we can add xorg.conf
options later but for now it will do.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/73>
2025-12-15 14:05:20 +01:00
Peter Hutterer
733692c9ce meson.build: add dep_libinput as dependency for the KANA check
So meson can find the libinput.h header if libinput is in a nonstandard
path.

Fixes: 0bcb60e744 ("Add support for LIBINPUT_LED_COMPOSE/LIBINPUT_LED_KANA")
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/72>
2025-12-15 13:54:48 +01:00
Enrico Weigelt, metux IT consult
e0c4e1afc4 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 13:39:29 +01:00
Enrico Weigelt, metux IT consult
577d0600c4 util-strings: don't crash the Xserver on memory alloc failure
It's only consumer already properly checking for NULL return value,
so can directly use calloc() here, instead of zalloc() which is
crashing the Xserver.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:55:56 +01:00
Peter Hutterer
1d7b5c8196 meson.build: install the libinput-properties.h file
Patch provided by Brice De Bruyne

Closes #67

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/71>
2025-08-18 10:50:43 +02:00
Oleh Nykyforchyn
a95e7b25e6 src: move _GNU_SOURCE definition before all includes in files that need vasprintf()
Build of input-libinput fails on GCC-11.2 although succeeds on GCC-14.2.
Function vasprintf() becomes implicitle declared because its definition
in stdio.h is guarded by __GLIBC_USE_LIB_EXT2 which depends on _USE_GNU,
which in turn depends on __GNU_SOURCE. __GNU_SOURCE is defined at
the beginning of util_string.h before #include <stdio.h>, and this file
is included by util_strings.c and xf86libinput.c. The latter file
includes first a lot of headers in /usr/include and /usr/include/xorg,
and finally util_string.h. If some of the previous header files
#include <stdio.h>, then it is included first without _GNU_SOURCE, and
vasprintf() is left undefined, which causes a build error.

This patch moves #define _GNU_SOURCE to util_strings.c and xf86libinput.c
from util_strings.h, thus making vasprintf() declaration safe and
independent of a specific compiler.

Signed-off-by: Oleh Nykyforchyn <olen.nyk@gmail.com>
2025-08-18 10:50:14 +02:00
b-aaz
f03931201b configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 18:51:09 +02:00
Enrico Weigelt, metux IT consult
13559018bd .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 17:24:43 +02:00
dec05eba
2e1f7a9b3a Improve xinput scrolling factor documentation
Use correct name for "libinput Scrolling Pixel Distance".

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-07-09 19:33:48 +02:00
dec05eba
9e3544b258 Add ScrollFactor option to change mouse/touchpad scroll speed
Add xorg option ScrollFactor.
Add xinput option "libinput Scrolling Factor".

This works well in xi2 applications where they receive the raw scroll
value, however applications that use the core x11 protocol only for input
receive a scroll button press. The frequency this scroll button press
event is sent depends on the value of ScrollFactor, so it works in such
applications as well but the scrolling wont be as "smooth" as if they
used xi2.

gtk, qt, chromium (and electron) applications seem to use xi2 while
firefox does not, unless you set the MOZ_USE_XINPUT2=1 environment
variable.

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-07-09 16:48:28 +02:00
callmetango
cda5a982af .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:02:05 +02:00
Enrico Weigelt, metux IT consult
83adc38e59 fix name clash on range parameter
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 19:03:33 +02:00
Enrico Weigelt, metux IT consult
1330f1ded1 util-strings: drop unused xasprintf()
Unsed code and just making trouble on correctly including stdio.h, because
it's using a GNU extension function -- vasprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 16:45:48 +02:00
Enrico Weigelt, metux IT consult
8366e3a41e util-strings: drop unused xvasprintf()
Unsed code and just making trouble on correctly including stdio.h, because
it's using a GNU extension function -- vasprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 16:40:16 +02:00
Alan Coopersmith
9c64c0236c Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/70>
2025-06-01 09:32:20 -07:00
Enrico Weigelt, metux IT consult
c674db53d9 fix unused variable click_methods
This variable is only used under certain (build-time) conditions,
so need needs to be defined/assigned under those.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/65>
2025-04-16 23:16:53 +00:00
Enrico Weigelt, metux IT consult
8a63e97e0c ci: fix missing diffutils
> checking if gcc supports -fno-rtti -fno-exceptions... /builds/metux/xf86-input-libinput/_builddir/../configure: line 8891: diff: command not found

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/67>
2025-04-16 15:41:43 +02:00
Peter Hutterer
c712930ef4 xf86-input-libinput 1.5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-10-15 14:06:00 +10:00
Peter Hutterer
db7cfbe5c2 test: fix some scan-build warnings
e.g.
../../../test/test-draglock.c:262:2: warning: Value stored to 'rc' is never read [deadcode.DeadStores]
  262 |         rc = draglock_init_from_string(&dl, "10");
2024-10-15 13:58:18 +10:00
Peter Hutterer
cb80d7f82d Map some specific high keycodes into the FK20-23 range
These mappings have been part of xkeyboard-config for over a decade and
the likely reason they were introduced is that the corresponding evdev
keycode is > 255.

Let's forcibly remap those in the driver here so the rest of the system
can switch to the real keycodes instead of having to map them to the
whatever X expects.

See https://github.com/systemd/systemd/pull/34325/

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/62>
2024-10-09 23:25:17 +00:00
Peter Hutterer
7c5635cd6f Silence a compiler warning
../src/xf86libinput.c: In function ‘prop_draglock_set_pairs’:
../src/xf86libinput.c:5153:30: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 5153 |                 if (pairs[i] > MAX_BUTTONS)

MAX_BUTTONS is defined by the server so let's use a temporary local
variable to silence the compiler.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/61>
2024-10-09 14:02:44 +10:00
Peter Hutterer
b396ba3697 Prevent theoretical null-pointer dereference
Cannot happen since we don't enter this function if the atom isn't one
of the three checked above but the static analyzer doesn't know that.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/60>
2024-09-13 03:06:20 +00:00
Martin Rys
0bcb60e744 Add support for LIBINPUT_LED_COMPOSE/LIBINPUT_LED_KANA
Added in libinput 1.26

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/58>
2024-09-12 09:31:01 +10:00
Peter Hutterer
3a33984cce Fix a bunch of whitespace issues
xf86libinput_kbd_ctrl() in particular was a copy/paste with 4-space
indentation, the rest is mostly space->tab replacement.

As pointed out in !58

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/59>
2024-09-06 10:14:31 +10:00
Peter Hutterer
bb41cc730c Add support for clickfinger button maps 2024-07-19 11:44:49 +10:00
Peter Hutterer
72c8eb25f8 Implement tablet tool pressure range support 2024-06-10 09:27:57 +00:00
Peter Hutterer
74335c6fd6 Revert "fix int type mismatches in printf()-like calls"
This now warns on 64-bit machines:
../src/xf86libinput.c:542:61: warning: format ‘%lu’ expects argument
of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=]

Given they vastly outnumber 32-bit machines now, let's go back to the
old one that only warns on 32 bit until we fix the actual source types
to use uint32_t and similar.

This reverts commit a7d2994256.
2024-06-07 11:14:17 +10:00
Enrico Weigelt, metux IT consult
b791b30b1f update .gitignore
"test/test-bezier" was yet missing

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:21:09 +01:00
Enrico Weigelt, metux IT consult
a7d2994256 fix int type mismatches in printf()-like calls
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:21:09 +01:00
Enrico Weigelt, metux IT consult
c6b4d2732f replace BUG_() macros by xf86IDrvMsg() calls
Latest master moved the BUG_() macros out of os.h, and it's more appropriate
to use xf86IDrvMsg() in those cases (like we're already doing in other places)
anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:19:47 +01:00
Peter Hutterer
6ed6814489 gitlab CI: update to latest templates and current fedora 2024-02-20 08:24:15 +10:00
Peter Hutterer
a24f467576 Add editorconfig file 2024-02-20 08:22:16 +10:00
Peter Hutterer
b254d491e2 Add a property for the tablet tool serial and hw ID
The driver encodes the serial in the device name but that's not reliable
enough. Expose both serial and tool id (optional) as a property so
clients can read them and adjust their behavior accordingly.

Fixes #16
2023-11-10 08:17:46 +10:00
Peter Hutterer
0dc42f0e4e Sort the read-only properties 2023-11-10 08:16:59 +10:00
Peter Hutterer
46af622e9d xf86-input-libinput 1.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-08-25 13:51:18 +10:00
Peter Hutterer
5e20d16dd4 Don't try to enable a NULL device
If there is no other libinput device in our list (and next is thus NULL),
skip the xf86AddEnabledDevice() call.

Fixes #60
2023-07-10 09:05:19 +10:00
Peter Hutterer
310db4206f Don't run past the last element in the list
If there is no (other) libinput device in the current device list, we'd
eventually end up with next == NULL, causing a segfault.

Fixes #60
2023-07-03 13:33:19 +10:00
Peter Hutterer
94a52a8488 tablet: map BTN_STYLUS3 to button 8
Buttons 4-7 are out of bounds for hysterical historical reasons.
Previously this button fell through to the default statement and
resulted in 8 + BTN_STYLUS3 - BTN_SIDE == 65 which is rather obviously
wrong.

Instead, map it explicitly to what the fourth button would be mapped to
on other devices. This will now overlap with BTN_SIDE on devices that
both BTN_STYLUS3 *and* BTN_SIDE but those devices don't appear to exist
in the real world.

Fixes #50

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-15 15:09:31 +10:00
Peter Hutterer
a4dfadee2f Initialize the left-handed property for tablet tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-08 14:14:37 +10:00
Peter Hutterer
141aa867a6 Change the capabilities to an enum
Slightly nicer for debugging.
2023-06-08 14:14:37 +10:00
Yinon Burgansky
57b049d376 Improve documentation of the custom acceleration profile 2023-04-26 01:33:46 +03:00
26 changed files with 1375 additions and 552 deletions

View File

@@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Select the version
options:
- 1.5.0.1
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: |
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View File

@@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be done.

View File

@@ -0,0 +1,49 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View File

@@ -0,0 +1,38 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

43
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

50
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
permissions:
contents: write
on:
push:
pull_request:
jobs:
ubuntu:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
freebsd:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/freebsd@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
dragonfly:
strategy:
matrix:
# xlibre-xserver-25.0.x not compiling on dragonfly yet
xserver-version: [ master, xlibre-xserver-25.1.0 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
# not supported on NetBSD
release-notes:
name: Release pushed tag
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
needs: [ ubuntu, freebsd, dragonfly ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: X11Libre/action-build-driver/release@v0.3.7

1
.gitignore vendored
View File

@@ -84,3 +84,4 @@ core
test-driver
tags
.vimdir
test/test-bezier

View File

@@ -1,98 +0,0 @@
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
#
# This CI uses the freedesktop.org ci-templates.
# Please see the ci-templates documentation for details:
# https://freedesktop.pages.freedesktop.org/ci-templates/
.templates_sha: &template_sha c5626190ec14b475271288dda7a7dae8dbe0cd76 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include:
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/fedora.yml'
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/ci-fairy.yml'
- template: Security/SAST.gitlab-ci.yml
variables:
FDO_UPSTREAM_REPO: xorg/driver/xf86-input-libinput
stages:
- containers
- build
- test
.fedora:
variables:
FDO_DISTRIBUTION_VERSION: 33
FDO_DISTRIBUTION_PACKAGES: 'git autoconf automake libtool make xorg-x11-server-devel libudev-devel libevdev-devel libinput-devel xorg-x11-util-macros'
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/fedora-install.sh'
FDO_DISTRIBUTION_TAG: '2021-09-15.0'
fedora@container_build:
extends:
- .fedora
- .fdo.container-build@fedora
stage: containers
variables:
GIT_STRATEGY: none
.default_build:
stage: build
script:
- mkdir _builddir _inst
- pushd _builddir > /dev/null
- ../autogen.sh --prefix=$(realpath ../_inst) --disable-silent-rules
- make && make check
- make install
- popd > /dev/null
artifacts:
name: "automake-logs-$CI_JOB_NAME"
when: always
expire_in: 1 week
paths:
- _builddir/config.log
fedora:33@default-build:
extends:
- .fedora
- .fdo.distribution-image@fedora
- .default_build
#
# Verify that commit messages are as expected
#
check-commits:
extends:
- .fdo.ci-fairy
stage: test
script:
- ci-fairy check-commits --junit-xml=results.xml
except:
- master@xorg/driver/xf86-input-libinput
variables:
GIT_DEPTH: 100
artifacts:
reports:
junit: results.xml
allow_failure: true
#
# Verify that the merge request has the allow-collaboration checkbox ticked
#
check-merge-request:
extends:
- .fdo.ci-fairy
stage: test
script:
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
artifacts:
when: on_failure
reports:
junit: results.xml
allow_failure: true

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# we require at least inputproto >= 2.3.99.1 which has been released in xorgproto 2021.5
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git --depth 1 --branch=xorgproto-2021.5
pushd xorgproto
./autogen.sh
make -j${FDO_CI_CONCURRENT:-4} install
popd
rm -rf xorgproto

View File

@@ -19,7 +19,10 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
# During distcheck, system locations (as provided by pkg-config) may
# not be writable; provide instead relative locations.
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules' \
--with-sdkdir='$${includedir}/xorg'
SUBDIRS = src include man test
MAINTAINERCLEANFILES = ChangeLog INSTALL

View File

@@ -2,7 +2,8 @@ xf86-input-libinput - a libinput-based X driver
===============================================
The official repository for this driver is
https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
https://github.com/X11Libre/xf86-input-evdev
This is an X driver based on libinput. It is a thin wrapper around libinput,
so while it does provide all features that libinput supports it does little
@@ -12,19 +13,6 @@ beyond.
usable input devices in your X session. Use with caution.***
Prerequisites
-------------
To build, you'll need the X.Org X server SDK (check your distribution for a
xorg-x11-server-devel package or similar) and libinput (check your
distribution for libinput-devel or similar).
To get libinput from source, see:
https://www.freedesktop.org/wiki/Software/libinput/
To build the X server from source:
https://www.x.org/wiki/Building_the_X_Window_System/
Building
--------
@@ -43,13 +31,3 @@ Install the default configuration file:
cp conf/99-libinput.conf /etc/X11/xorg.conf.d/
This will assign this driver to *all* devices. Use with caution.
Bugs
----
Bugs in libinput go to the Issues section of the libinput gitlab project:
https://gitlab.freedesktop.org/libinput/libinput/issues
Bugs in this driver go to the Issues section of its gitlab project:
https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues

View File

@@ -22,10 +22,10 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
[1.3.0],
[https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues],
[xf86-input-libinput])
AC_INIT([xlibre-xf86-input-libinput],
[25.0.1],
[https://github.com/X11Libre/xf86-input-libinput/issues],
[xlibre-xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
@@ -43,13 +43,11 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.19] xproto [inputproto >= 2.2])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
CFLAGS="$CFLAGS -Wno-declaration-after-statement"
PKG_CHECK_MODULES(INPUTPROTO24, [inputproto >= 2.3.99.1],
[AC_DEFINE(HAVE_INPUTPROTO24, [1], [inputproto 2.4 is available])],
[:])
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0] xproto [inputproto >= 2.3.99.1])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
OLD_LIBS=$LIBS
OLD_CFLAGS=$CFLAGS
@@ -89,15 +87,49 @@ AC_LINK_IFELSE(
[AC_MSG_RESULT([no])
[libinput_have_custom_accel=no]])
AC_MSG_CHECKING([if libinput_tablet_tool_config_pressure_range_set is available])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <libinput.h>]],
[[libinput_tablet_tool_config_pressure_range_set(0)]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_LIBINPUT_PRESURE_RANGE, [1],
[libinput_tablet_tool_config_pressure_range_set() is available])
[libinput_have_pressure_range=yes]],
[AC_MSG_RESULT([no])
[libinput_have_pressure_range=no]])
AC_MSG_CHECKING([if libinput_device_config_click_set_clickfinger_button_map is available])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <libinput.h>]],
[[libinput_device_config_click_set_clickfinger_button_map(NULL, 0)]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_LIBINPUT_CLICKFINGER_BUTTON_MAP, [1],
[libinput_device_config_click_set_clickfinger_button_map() is available])
[libinput_have_clickfinger_button_map=yes]],
[AC_MSG_RESULT([no])
[libinput_have_clickfinger_button_map=no]])
AC_MSG_CHECKING([if libinput_plugin_system_load is available])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <libinput.h>]],
[[libinput_plugin_system_load_plugins(NULL, 0)]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_LIBINPUT_PLUGINS, [1],
[libinput_plugin_system_load_plugins() is available])
[libinput_have_plugin_system=yes]],
[AC_MSG_RESULT([no])
[libinput_have_plugin_system=no]])
LIBS=$OLD_LIBS
CFLAGS=$OLD_CFLAGS
# Define a configure option for an alternate input module directory
PKG_PROG_PKG_CONFIG([0.25])
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
AS_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
inputdir=${moduledir}/input
AC_SUBST(inputdir)
@@ -116,9 +148,6 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
AC_SUBST([sdkdir])
DRIVER_NAME=libinput
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile

View File

@@ -51,6 +51,13 @@
/* Tap button default order: BOOL, 2 values in order LRM, LMR, read-only */
#define LIBINPUT_PROP_TAP_BUTTONMAP_DEFAULT "libinput Tapping Button Mapping Default"
/* Clickfinger button order: BOOL, 2 values in order LRM, LMR, only one may be set
at any time */
#define LIBINPUT_PROP_CLICKFINGER_BUTTONMAP "libinput Clickfinger Button Mapping Enabled"
/* Clickfinger button default order: BOOL, 2 values in order LRM, LMR, read-only */
#define LIBINPUT_PROP_CLICKFINGER_BUTTONMAP_DEFAULT "libinput Clickfinger Button Mapping Default"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
#define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
@@ -147,6 +154,12 @@
/* Scroll pixel distance: CARD32, 1 value, read-only */
#define LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE_DEFAULT "libinput Scrolling Pixel Distance Default"
/* Scroll factor: FLOAT, 1 value, 32 bit */
#define LIBINPUT_PROP_SCROLL_FACTOR "libinput Scrolling Factor"
/* Scroll factor: FLOAT, 1 value, 32 bit, read-only */
#define LIBINPUT_PROP_SCROLL_FACTOR_DEFAULT "libinput Scrolling Factor Default"
/* Click method: BOOL read-only, 2 values in order buttonareas, clickfinger
shows available click methods */
#define LIBINPUT_PROP_CLICK_METHODS_AVAILABLE "libinput Click Methods Available"
@@ -222,6 +235,15 @@
*/
#define LIBINPUT_PROP_TABLET_TOOL_PRESSURECURVE "libinput Tablet Tool Pressurecurve"
/* Tablet tool pressure range: float, 2 values, 32 bit
* Value range is [0.0, 1.0] for min and max physical pressure to map to the logical range
* Default value: 0.0 1.0
*/
#define LIBINPUT_PROP_TABLET_TOOL_PRESSURE_RANGE "libinput Tablet Tool Pressure Range"
/* Tablet tool pressure range: float, 2 values, 32 bit, read-only */
#define LIBINPUT_PROP_TABLET_TOOL_PRESSURE_RANGE_DEFAULT "libinput Tablet Tool Pressure Range Default"
/* Tablet tool area ratio: CARD32, 2 values, w and h */
#define LIBINPUT_PROP_TABLET_TOOL_AREA_RATIO "libinput Tablet Tool Area Ratio"
@@ -229,4 +251,19 @@
* If disabled, high-resolution wheel scroll events are discarded */
#define LIBINPUT_PROP_HIRES_WHEEL_SCROLL_ENABLED "libinput High Resolution Wheel Scroll Enabled"
/* The tablet tool unique serial number: CARD32, 1 value, constant for the
* lifetime of the device.
*
* If this property exists and is zero, the tool does not have a unique serial
* number.
*/
#define LIBINPUT_PROP_TABLET_TOOL_SERIAL "libinput Tablet Tool Serial"
/* The tablet tool hardware ID: CARD32, 1 value, constant for the lifetime of the device.
*
* This property only exists if the device has a known tool ID.
* See libinput_tablet_tool_get_tool_id() in the libinput documentation for details.
*/
#define LIBINPUT_PROP_TABLET_TOOL_ID "libinput Tablet Tool ID"
#endif /* _LIBINPUT_PROPERTIES_H_ */

View File

@@ -22,11 +22,11 @@
drivermandir = $(DRIVER_MAN_DIR)
driverman_PRE = $(DRIVER_NAME).man
driverman_PRE = libinput.man
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
EXTRA_DIST = $(DRIVER_NAME).man
EXTRA_DIST = libinput.man
CLEANFILES = $(driverman_DATA)

View File

@@ -1,6 +1,7 @@
'\" t
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH LIBINPUT 4 @VERSION@
.TH LIBINPUT 4 2025-06-01 "@VERSION@"
.SH NAME
libinput \- libinput-based X.Org input driver
.SH SYNOPSIS
@@ -14,74 +15,93 @@ libinput \- libinput-based X.Org input driver
.fi
.SH NOTE
This is the man page for the X input driver. If you are looking for the
library documentation, go to
.BI http://wayland.freedesktop.org/libinput/doc/
This is the man page for the X input driver.
If you are looking for the library documentation, go to
.B http://wayland.freedesktop.org/libinput/doc/
.SH DESCRIPTION
.B libinput
is an Xorg input driver based on libinput. It
therefore supports all input devices that libinput can handle, including
is an XLibre input driver based on libinput.
It therefore supports all input devices that libinput can handle, including
most mice, keyboards, tablets and touchscreens.
.PP
It is recommended that
.B libinput
devices are configured through the
.B InputClass
directive (refer to xorg.conf(5)) instead of manual
per-device configuration. Devices configured in the
xorg.conf(5) are not hot-plug capable.
directive (refer to
.BR xorg.conf (5))
instead of manual per-device configuration.
Devices configured using the
.B InputDevice
directive in the
.BR xorg.conf (5)
file are not hot-plug capable.
.SH CONFIGURATION DETAILS
Please refer to xorg.conf(5) for general configuration
details and for options that can be used with all input drivers. This
section only covers configuration details specific to this driver.
Please refer to
.BR xorg.conf (5)
for general configuration details
and for options that can be used with all input drivers.
This section only covers configuration details specific to this driver.
.PP
The following driver
.B Options
are supported:
.TP 7
.BI "Option \*qAccelProfile\*q \*q" string \*q
Sets the pointer acceleration profile to the given profile. Permitted values
are
.BI adaptive,
.BI flat,
.BI custom.
Not all devices support this option or all profiles. If a profile is
unsupported, the default profile for this device is used. For a description
on the profiles and their behavior, see the libinput documentation.
Sets the pointer acceleration profile to the given profile.
Permitted values are
.BR adaptive ,
.BR flat ,
.BR custom .
Not all devices support this option or all profiles.
If a profile is unsupported, the default profile for this device is used.
For a description on the profiles and their behavior,
see the libinput documentation.
.TP 7
.BI "Option \*qAccelSpeed\*q \*q" float \*q
Sets the pointer acceleration speed within the range [-1, 1].
This only applies to the flat or adaptive profile.
.BI "Option \*AccelPointsFallback\*q \*q" string \*q
Sets the points of the Fallback acceleration function, (see the libinput documentation).
The string must be a space-separated list of floating point non-negative numbers, e.g.
.TP 7
.BI "Option \*qAccelPointsFallback\*q \*q" string \*q
.TQ
.BI "Option \*qAccelPointsMotion\*q \*q" string \*q
.TQ
.BI "Option \*qAccelPointsScroll\*q \*q" string \*q
Sets the points of the Fallback/Motion/Scroll acceleration functions.
The string must be a space-separated list of
floating point non-negative numbers, e.g.,
"0.0 1.0 2.4 2.5".
This only applies to the custom profile.
.BI "Option \*AccelStepFallback\*q \*q" float \*q
Sets the step between the points of the Fallback acceleration function, (see the libinput documentation).
When a step of 0.0 is provided, libinput's default Fallback acceleration function is used.
See section
.B CUSTOM ACCELERATION PROFILE
.TP 7
.BI "Option \*qAccelStepFallback\*q \*q" float \*q
.TQ
.BI "Option \*qAccelStepMotion\*q \*q" float \*q
.TQ
.BI "Option \*qAccelStepScroll\*q \*q" float \*q
Sets the step between the points of the Fallback/Motion/Scroll
acceleration functions.
When a step of 0.0 is provided,
libinput's Fallback acceleration function is used.
This only applies to the custom profile.
.BI "Option \*AccelPointsMotion\*q \*q" string \*q
Equivalent to AccelPointsFallback but applies to the Motion acceleration function.
.BI "Option \*AccelStepMotion\*q \*q" float \*q
Equivalent to AccelStepFallback but applies to the Motion acceleration function.
.BI "Option \*AccelPointsScroll\*q \*q" string \*q
Equivalent to AccelPointsFallback but applies to the Scroll acceleration function.
.BI "Option \*AccelStepScroll\*q \*q" float \*q
Equivalent to AccelStepFallback but applies to the Scroll acceleration function.
See section
.B CUSTOM ACCELERATION PROFILE
.TP 7
.BI "Option \*qButtonMapping\*q \*q" string \*q
Sets the logical button mapping for this device, see
XSetPointerMapping(3). The string must be a
space-separated list of button mappings in the order of the
.BR XSetPointerMapping (3).
The string must be a space-separated list of button mappings in the order of the
logical buttons on the device, starting with button 1.
The default mapping is "1 2 3 ... 32". A mapping of 0
deactivates the button. Multiple buttons can have the same mapping.
The default mapping is "1 2 3 ... 32".
A mapping of 0 deactivates the button.
Multiple buttons can have the same mapping.
Invalid mapping strings are discarded and the default mapping
is used for all buttons. Buttons not specified in the user's mapping use the
default mapping. See section
is used for all buttons.
Buttons not specified in the user's mapping use the default mapping.
See section
.B BUTTON MAPPING
for more details.
.TP 7
@@ -92,44 +112,49 @@ Sets the calibration matrix to the 3x3 matrix where the first row is (abc),
the second row is (def) and the third row is (ghi).
.TP 7
.BI "Option \*qClickMethod\*q \*q" string \*q
Enables a click method. Permitted values are
.BI none,
.BI buttonareas,
.BI clickfinger.
Not all devices support all methods, if an option is unsupported, the
default click method for this device is used.
Enables a click method.
Permitted values are
.BR none ,
.BR buttonareas ,
.BR clickfinger .
Not all devices support all methods.
If an option is unsupported, the default click method for this device is used.
.TP 7
.BI "Option \*qDisableWhileTyping\*q \*q" bool \*q
Indicates if the touchpad should be disabled while typing on the keyboard
(this does not apply to modifier keys such as Ctrl or Alt).
.TP 7
.BI "Option \*qDevice\*q \*q" string \*q
Specifies the device through which the device can be accessed. This will
generally be of the form \*q/dev/input/eventX\*q, where X is some integer.
Specifies the device through which the device can be accessed.
This will generally be of the form \*q/dev/input/eventX\*q,
where X is some integer.
When using
.B InputClass
directives, this option is set by the server.
The mapping from device node to hardware is system-dependent. Property:
"Device Node" (read-only).
The mapping from device node to hardware is system-dependent.
Property: "Device Node" (read-only).
.TP 7
.BI "Option \*qDragLockButtons\*q \*q" "L1 B1 L2 B2 ..." \*q
Sets "drag lock buttons" that simulate a button logically down even when it has
been physically released. To logically release a locked button, a second click
of the same button is required.
been physically released.
To logically release a locked button,
a second click of the same button is required.
.IP
If the option is a single button number, that button acts as the
"meta" locking button for the next button number. See section
"meta" locking button for the next button number.
See section
.B BUTTON DRAG LOCK
for details.
.IP
If the option is a list of button number pairs, the first number of each
number pair is the lock button, the second number the logical button number
to be locked. See section
to be locked.
See section
.B BUTTON DRAG LOCK
for details.
.IP
For both meta and button pair configuration, the button numbers are
device button numbers, i.e. the
For both meta and button pair configuration,
the button numbers are device button numbers, i.e. the
.B ButtonMapping
applies after drag lock.
.TP 7
@@ -139,77 +164,110 @@ the driver forwards only high-resolution wheel scroll events from libinput.
When disabled, the driver forwards legacy wheel scroll events instead.
.TP 7
.BI "Option \*qHorizontalScrolling\*q \*q" bool \*q
Enables or disables horizontal scrolling. When disabled, this driver will
discard any horizontal scroll events from libinput. This does not disable
horizontal scroll events from libinput; it merely discards the horizontal axis
from any scroll events. Default is enabled.
Enables or disables horizontal scrolling.
When disabled,
this driver will discard any horizontal scroll events from libinput.
This does not disable horizontal scroll events from libinput;
it merely discards the horizontal axis from any scroll events.
Default is enabled.
.TP 7
.BI "Option \*qLeftHanded\*q \*q" bool \*q
Enables left-handed button orientation, i.e. swapping left and right buttons.
.TP 7
.BI "Option \*qMiddleEmulation\*q \*q" bool \*q
Enables middle button emulation. When enabled, pressing the left and right
Enables middle button emulation.
When enabled, pressing the left and right
buttons simultaneously produces a middle mouse button click.
A synonym
.IP
.BI "Option \*qEmulate3Buttons\*q \*q" bool \*q
.IP
is preserved for compatibility with
.B evdev
driver, with
.BI "\*qMiddleEmulation\*q
having preference if both are set.
.TP 7
.BI "Option \*qNaturalScrolling\*q \*q" bool \*q
Enables or disables natural scrolling behavior.
.TP 7
.BI "Option \*qRotationAngle\*q \*q" float \*q
Sets the rotation angle of the device to the given angle, in degrees
clockwise. The angle must be between 0.0 (inclusive) and 360.0 (exclusive).
Sets the rotation angle of the device to the given angle, in degrees clockwise.
The angle must be between 0.0 (inclusive) and 360.0 (exclusive).
.TP 7
.BI "Option \*qScrollButton\*q \*q" int \*q
Designates a button as scroll button. If the
.BI ScrollMethod
Designates a button as scroll button.
If the
.B ScrollMethod
is
.BI button
.B button
and the button is logically down, x/y axis movement is converted into
scroll events.
.TP 7
.BI "Option \*qScrollButtonLock\*q \*q" bool \*q
Enables or disables the scroll button lock. If enabled, the
.BI ScrollButton
Enables or disables the scroll button lock.
If enabled, the
.B ScrollButton
is considered logically down after the first click and remains down until
the second click of that button. If disabled (the default), the
.BI ScrollButton
the second click of that button.
If disabled (the default), the
.B ScrollButton
button is considered logically down while held down and up once physically
released.
.TP 7
.BI "Option \*qScrollFactor\*q \*q" float \*q
Sets the scroll factor for scroll events. A value higher than 1.0 means faster scrolling.
Applications that don't support xi2 input will instead receive scroll button events
less or more frequently depending on the scroll factor value, instead of scrolling "smoother".
.TP 7
.BI "Option \*qScrollMethod\*q \*q" string \*q
Enables a scroll method. Permitted values are
.BI none,
.BI twofinger,
.BI edge,
.BI button.
Not all devices support all options, if an option is unsupported, the
default scroll option for this device is used.
.BR none ,
.BR twofinger ,
.BR edge ,
.BR button .
Not all devices support all options.
If an option is unsupported, the default scroll option for this device is used.
.TP 7
.BI "Option \*qScrollPixelDistance\*q \*q" int \*q
Sets the movement distance, in "pixels", required to trigger one logical
wheel click. This option only applies to the scroll methods
.BI twofinger,
.BI edge,
.BI button.
wheel click.
This option only applies to the scroll methods
.BR twofinger ,
.BR edge ,
.BR button .
See section
.B SCROLL PIXEL DISTANCE
for more details.
.TP 7
.BI "Option \*qSendEventsMode\*q \*q" (disabled|enabled|disabled-on-external-mouse) \*q
Sets the send events mode to disabled, enabled, or "disable when an external
mouse is connected".
Sets the send events mode to disabled, enabled,
or "disable when an external mouse is connected".
.TP 7
.BI "Option \*qTabletToolPressureCurve\*q \*q" "x0/y0 x1/y1 x2/y2 x3/y3" \*q
Set the pressure curve for a tablet stylus to the bezier formed by the four
points. The respective x/y coordinate must be in the [0.0, 1.0] range. For
more information see section
.B TABLET STYLUS PRESSURE CURVE.
points.
The respective x/y coordinate must be in the [0.0, 1.0] range.
For more information see section
.B TABLET TOOL PRESSURE CURVE.
.TP 7
.BI "Option \*qTabletToolPressureRange\*q \*q" "min max" \*q
Set the pressure range for a tablet stylus to the given subset of the physical
range.
The min/max values must be in the [0.0, 1.0] range.
For example, a min of 0.3 means the tablet will send 0 pressure for anything
equal or below 30% of the physical pressure range and a max of 0.7 means
the tablet sends its maximum pressure value for any pressure equal or higher to
70% of the physical pressure range.
.TP 7
.BI "Option \*qTabletToolAreaRatio\*q \*q" "w:h" \*q
Sets the area ratio for a tablet tool. The area always starts at the
origin (0/0) and expands to the largest available area with the specified
aspect ratio. Events outside this area are cropped to the area. The special
value "default" is used for the default mapping (i.e. the device-native
mapping). For more information see section
Sets the area ratio for a tablet tool.
The area always starts at the origin (0/0) and
expands to the largest available area with the specified aspect ratio.
Events outside this area are cropped to the area.
The special value "default" is used for the default mapping
(i.e. the device-native mapping).
For more information see section
.B TABLET TOOL AREA RATIO.
.TP 7
.BI "Option \*qTapping\*q \*q" bool \*q
@@ -220,150 +278,195 @@ Set the button mapping for 1/2/3-finger taps to left/right/middle or
left/middle/right, respectively.
.TP 7
.BI "Option \*qTappingDrag\*q \*q" bool \*q
Enables or disables drag during tapping behavior ("tap-and-drag"). When
enabled, a tap followed by a finger held down causes a single button down
Enables or disables drag during tapping behavior ("tap-and-drag").
When enabled, a tap followed by a finger held down causes a single button down
only, all motions of that finger thus translate into dragging motion.
Tap-and-drag requires option
.B Tapping
to be enabled.
.TP 7
.BI "Option \*qTappingDragLock\*q \*q" bool \*q
Enables or disables drag lock during tapping behavior. When enabled, a
finger up during tap-and-drag will not immediately release the button. If
the finger is set down again within the timeout, the dragging process
continues.
Enables or disables drag lock during tapping behavior.
When enabled,
a finger up during tap-and-drag will not immediately release the button.
If the finger is set down again within the timeout,
the dragging process continues.
.PP
For all options, the options are only parsed if the device supports that
configuration option. For all options, the default value is the one used by
libinput. On configuration failure, the default value is applied.
configuration option.
For all options, the default value is the one used by libinput.
On configuration failure, the default value is applied.
.SH SUPPORTED PROPERTIES
.B libinput
exports runtime-configurable options as properties. If a property listed
below is not available, the matching configuration option is not available
on the device. This however does not imply that the feature is not available
on the device. The following properties are provided by the
exports runtime-configurable options as properties.
If a property listed below is not available,
the matching configuration option is not available on the device.
This however does not imply that the feature is not available on the device.
The following properties are provided by the
.B libinput
driver.
.TP 7
.BI "libinput Accel Profiles Available"
2 boolean values (8 bit, 0 or 1), in order "adaptive", "flat".
.B "libinput Accel Profiles Available"
3 boolean values (8 bit, 0 or 1), in order "adaptive", "flat", "custom".
Indicates which acceleration profiles are available on this device.
.TP 7
.BI "libinput Accel Profile Enabled"
2 boolean values (8 bit, 0 or 1), in order "adaptive", "flat".
.B "libinput Accel Profile Enabled"
3 boolean values (8 bit, 0 or 1), in order "adaptive", "flat", "custom".
Indicates which acceleration profile is currently enabled on this device.
.TP 7
.BI "libinput Accel Speed"
1 32-bit float value, defines the pointer speed. Value range -1, 1
.B "libinput Accel Speed"
1 32-bit float value, defines the pointer speed.
Value range -1, 1.
This only applies to the flat or adaptive profile.
.TP 7
.BI "libinput Button Scrolling Button"
1 32-bit value. Sets the button number to use for button scrolling. This
setting is independent of the scroll method, to enable button scrolling the
.B "libinput Accel Custom Fallback Points"
.TQ
.B "libinput Accel Custom Motion Points"
.TQ
.B "libinput Accel Custom Scroll Points"
A space-separated list of 32-bit floating point non-negative numbers, e.g.
"0.0 1.0 2.4 2.5".
Sets the points of the Fallback/Motion/Scroll acceleration functions.
This only applies to the custom profile.
See section
.B CUSTOM ACCELERATION PROFILE
.TP 7
.B "libinput Accel Custom Fallback Step"
.TQ
.B "libinput Accel Custom Motion Step"
.TQ
.B "libinput Accel Custom Scroll Step"
1 32-bit float value, sets the step between the points of the
Fallback/Motion/Scroll acceleration functions.
When a step of 0.0 is provided, libinput's Fallback acceleration
function is used.
This only applies to the custom profile.
See section
.B CUSTOM ACCELERATION PROFILE
.TP 7
.B "libinput Button Scrolling Button"
1 32-bit value. Sets the button number to use for button scrolling.
This setting is independent of the scroll method, to enable button scrolling the
method must be set to button-scrolling and a valid button must be set.
.TP 7
.BI "libinput Button Scrolling Button Lock Enabled"
1 boolean value. If true, the scroll button lock is enabled. This
setting is independent of the scroll method or the scroll button, to enable
.B "libinput Button Scrolling Button Lock Enabled"
1 boolean value. If true, the scroll button lock is enabled.
This setting is independent of the scroll method or the scroll button, to enable
button scrolling the method must be set to button-scrolling and a valid
button must be set.
.TP 7
.BI "libinput Calibration Matrix"
.B "libinput Calibration Matrix"
9 32-bit float values, representing a 3x3 calibration matrix, order is row
1, row 2, row 3
.TP 7
.BI "libinput Click Methods Available"
.B "libinput Click Methods Available"
2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
Indicates which click methods are available on this device.
.TP 7
.BI "libinput Click Methods Enabled"
.B "libinput Click Methods Enabled"
2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
Indicates which click methods are enabled on this device.
.TP 7
.BI "libinput Drag Lock Buttons"
.B "libinput Drag Lock Buttons"
Either one 8-bit value specifying the meta drag lock button, or a list of
button pairs. See section
button pairs.
See section
.B BUTTON DRAG LOCK
for details.
.TP 7
.BI "libinput High Resolution Wheel Scroll Enabled"
1 boolean value (8 bit, 0 or 1). Indicates whether high-resolution
wheel scroll events are enabled or not.
.B "libinput High Resolution Wheel Scroll Enabled"
1 boolean value (8 bit, 0 or 1).
Indicates whether high-resolution wheel scroll events are enabled or not.
.TP 7
.BI "libinput Horizontal Scroll Enabled"
1 boolean value (8 bit, 0 or 1). Indicates whether horizontal scrolling
events are enabled or not.
.B "libinput Horizontal Scroll Enabled"
1 boolean value (8 bit, 0 or 1).
Indicates whether horizontal scrolling events are enabled or not.
.TP 7
.BI "libinput Left Handed Enabled"
1 boolean value (8 bit, 0 or 1). Indicates if left-handed mode is enabled or
disabled.
.B "libinput Left Handed Enabled"
1 boolean value (8 bit, 0 or 1).
Indicates if left-handed mode is enabled or disabled.
.TP 7
.BI "libinput Middle Emulation Enabled"
1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or
disabled.
.B "libinput Middle Emulation Enabled"
1 boolean value (8 bit, 0 or 1).
Indicates if middle emulation is enabled or disabled.
.TP 7
.BI "libinput Natural Scrolling Enabled"
1 boolean value (8 bit, 0 or 1). 1 enables natural scrolling
.B "libinput Natural Scrolling Enabled"
1 boolean value (8 bit, 0 or 1).
1 enables natural scrolling.
.TP 7
.BI "libinput Rotation Angle"
1 32-bit float value [0.0 to 360.0). Sets the rotation angle of the device,
.B "libinput Rotation Angle"
1 32-bit float value [0.0 to 360.0).
Sets the rotation angle of the device,
clockwise of its natural neutral position.
.TP 7
.BI "libinput Scroll Methods Available"
.B "libinput Scrolling Factor"
1 32-bit float value.
Sets the scroll factor for scroll events. A value higher than 1.0 means faster scrolling.
Applications that don't support xi2 input will instead receive scroll button events
less or more frequently depending on the scroll factor value, instead of scrolling "smoother".
.TP 7
.B "libinput Scroll Methods Available"
3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
Indicates which scroll methods are available on this device.
.TP 7
.BI "libinput Scroll Method Enabled"
.B "libinput Scroll Method Enabled"
3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
Indicates which scroll method is currently enabled on this device.
.TP 7
.BI "libinput Scroll Pixel Distance"
.B "libinput Scrolling Pixel Distance"
1 32-bit value (nonzero, with additional implementation-defined range checks).
Changes the movement distance required to trigger one logical wheel click.
.TP 7
.BI "libinput Send Events Modes Available"
.B "libinput Send Events Modes Available"
2 boolean values (8 bit, 0 or 1), in order "disabled" and
"disabled-on-external-mouse". Indicates which send-event modes are available
on this device.
"disabled-on-external-mouse".
Indicates which send-event modes are available on this device.
.TP 7
.BI "libinput Send Events Mode Enabled"
.B "libinput Send Events Mode Enabled"
2 boolean values (8 bit, 0 or 1), in order "disabled" and
"disabled-on-external-mouse". Indicates which send-event modes is currently
enabled on this device.
"disabled-on-external-mouse".
Indicates which send-event mode is currently enabled on this device.
.TP 7
.BI "libinput Tablet Tool Pressurecurve"
4 32-bit float values [0.0 to 1.0]. See section
.B "libinput Tablet Tool Pressurecurve"
4 32-bit float values [0.0 to 1.0].
See section
.B TABLET TOOL PRESSURE CURVE
.TP 7
.BI "libinput Tablet Tool Area Ratio"
2 32-bit values, corresponding to width and height. Special value 0, 0
resets to the default ratio. See section
.B "libinput Tablet Tool Area Ratio"
2 32-bit values, corresponding to width and height.
Special value 0, 0 resets to the default ratio.
See section
.B TABLET TOOL AREA RATIO
for more information.
.TP 7
.BI "libinput Tapping Enabled"
1 boolean value (8 bit, 0 or 1). 1 enables tapping
.B "libinput Tapping Enabled"
1 boolean value (8 bit, 0 or 1).
1 enables tapping.
.TP 7.
.B "libinput Tapping Button Mapping Enabled"
2 boolean value (8 bit, 0 or 1), in order "lrm" and "lmr".
Indicates which button mapping is currently enabled on this device.
.TP 7
.BI "libinput Tapping Button Mapping Enabled"
2 boolean value (8 bit, 0 or 1), in order "lrm" and "lmr". Indicates which
button mapping is currently enabled on this device.
.B "libinput Tapping Drag Lock Enabled"
1 boolean value (8 bit, 0 or 1).
1 enables drag lock during tapping.
.TP 7
.BI "libinput Tapping Drag Lock Enabled"
1 boolean value (8 bit, 0 or 1). 1 enables drag lock during tapping
.TP 7
.BI "libinput Disable While Typing Enabled"
1 boolean value (8 bit, 0 or 1). Indicates if disable while typing is
enabled or disabled.
.B "libinput Disable While Typing Enabled"
1 boolean value (8 bit, 0 or 1).
Indicates if disable while typing is enabled or disabled.
.PP
Most properties have a
.BI "libinput <property name> Default"
.B "libinput <property name> Default"
equivalent that indicates the default value for this setting on this device.
.SH BUTTON MAPPING
X clients receive events with logical button numbers, where 1, 2, 3
are usually interpreted as left, middle, right and logical buttons 4, 5, 6,
7 are usually interpreted as scroll up, down, left, right. The fourth and
fifth physical buttons on a device will thus send logical buttons 8 and 9.
X clients receive events with logical button numbers,
where 1, 2, 3 are usually interpreted as left, middle, right;
and logical buttons 4, 5, 6, 7 are usually interpreted
as scroll up, down, left, right.
The fourth and fifth physical buttons on a device
will thus send logical buttons 8 and 9.
The
.B ButtonMapping
option adjusts the logical button mapping, it does not affect how a physical
@@ -374,88 +477,136 @@ button mapping of
.B "\*q3 2 1 ...\*q"
On systems using the
.B libinput
Xorg input driver it is recommended to use the
XLibre input driver it is recommended to use the
.B LeftHanded
option instead.
.PP
The
.B libinput
Xorg input driver does not use the button mapping after setup.
Use XSetPointerMapping(3) to modify the button mapping at
runtime.
XLibre input driver does not use the button mapping after setup.
Use
.BR XSetPointerMapping (3)
to modify the button mapping at runtime.
.SH BUTTON DRAG LOCK
Button drag lock holds a button logically down even when the button itself
has been physically released since. Button drag lock comes in two modes.
has been physically released since.
Button drag lock comes in two modes.
.PP
If in "meta" mode, a meta button click activates drag lock for the next
button press of any other button. A button click in the future will keep
that button held logically down until a subsequent click of that same
button. The meta button events themselves are discarded. A separate meta
button click is required each time a drag lock should be activated for a
button in the future.
button press of any other button.
A button click in the future will keep that button held logically down
until a subsequent click of that same button.
The meta button events themselves are discarded.
A separate meta button click is required each time a drag lock should be
activated for a button in the future.
.PP
If in "pairs" mode, each button can be assigned a target locking button.
On button click, the target lock button is held logically down until the
next click of the same button. The button events themselves are discarded
next click of the same button.
The button events themselves are discarded
and only the target button events are sent.
.TP
.PP
This feature is provided by this driver, not by libinput.
.SH TABLET TOOL PRESSURECURVE
The pressure curve affects how stylus pressure is reported. By default, the
hardware pressure is reported as-is. By setting a pressure curve, the feel
of the stylus can be adjusted to be more like e.g. a pencil or a brush.
.SH TABLET TOOL PRESSURE CURVE
The pressure curve affects how stylus pressure is reported.
By default, the hardware pressure is reported as-is.
By setting a pressure curve, the feel of the stylus can be adjusted
to be more like e.g. a pencil or a brush.
.PP
The pressure curve is a cubic Bezier curve, drawn within a normalized range
of 0.0 to 1.0 between the four points provided. This normalized range is
applied to the tablet's pressure input so that the highest pressure maps to
1.0. The points must have increasing x coordinates, if x0 is larger than 0.0
all pressure values lower than x0 are equivalent to y0. If x3 is less than
1.0, all pressure values higher than x3 are equivalent to y3.
The input for a linear curve (default) is "0.0/0.0 0.0/0.0 1.0/1.0 1.0/1.0";
a slightly
depressed curve (firmer) might be "0.0/0.0 0.05/0.0 1.0/0.95 1.0/1.0"; a slightly raised
curve (softer) might be "0.0/0.0 0.0/0.05 0.95/1.0 1.0/1.0".
.TP
of 0.0 to 1.0 between the four points provided.
This normalized range is applied to the tablet's pressure input
so that the highest pressure maps to 1.0.
The points must have increasing x coordinates, if x0 is larger than 0.0
all pressure values lower than x0 are equivalent to y0.
If x3 is less than 1.0,
all pressure values higher than x3 are equivalent to y3.
.PP
The input for a linear curve (default) is "0.0/0.0 0.0/0.0 1.0/1.0 1.0/1.0";
a slightly depressed curve (firmer) might be
"0.0/0.0 0.05/0.0 1.0/0.95 1.0/1.0";
a slightly raised curve (softer) might be "0.0/0.0 0.0/0.05 0.95/1.0 1.0/1.0".
.PP
This feature is provided by this driver, not by libinput.
.SH TABLET TOOL AREA RATIO
By default, a tablet tool can access the whole sensor area and the tablet
area is mapped to the available screen area. For external tablets like
the Wacom Intuos series, the height:width ratio of the tablet may be
different to that of the monitor, causing the skew of input data.
area is mapped to the available screen area.
For external tablets like the Wacom Intuos series,
the height:width ratio of the tablet may be different to that of the monitor,
causing the skew of input data.
.PP
To avoid this skew of input data, an area ratio may be set to match the
ratio of the screen device. For example, a ratio of 4:3 will reduce the
available area of the tablet to the largest available area with a ratio of
4:3. Events within this area will scale to the tablet's announced axis
range, the area ratio is thus transparent to the X server. Any events
outside this area will send events equal to the maximum value of that axis.
The area always starts at the device's origin in it's current rotation, i.e.
ratio of the screen device.
For example, a ratio of 4:3 will reduce the available area of the tablet
to the largest available area with a ratio of 4:3.
Events within this area will scale to the tablet's announced axis range,
the area ratio is thus transparent to the X server.
Any events outside this area will send events equal to the maximum value of
that axis.
The area always starts at the device's origin in it's current rotation, i.e.,
it takes left-handed-ness into account.
.TP
.PP
This feature is provided by this driver, not by libinput.
.SH SCROLL PIXEL DISTANCE
The X server does not support per-pixel scrolling but it does support
smooth scrolling. All scroll events however are based around a logical
unit of scrolling (traditionally corresponding to a wheel click).
smooth scrolling.
All scroll events however are based around a logical unit of scrolling
(traditionally corresponding to a wheel click).
It is thus not possible to scroll by 10 pixels, but it is possible for a
driver to scroll by 1/10th of a logical wheel click.
.PP
libinput provides scroll data in pixels. The \fBScrollPixelDistance\fR
option defines the amount of movement equivalent to one wheel click. For
example, a value of 50 means the user has to move a finger by 50 pixels to
libinput provides scroll data in pixels.
The \fBScrollPixelDistance\fR option defines the amount of movement equivalent
to one wheel click.
For example, a value of 50 means the user has to move a finger by 50 pixels to
generate one logical click event and each pixel is 1/50th of a wheel click.
.SH CUSTOM ACCELERATION PROFILE
The custom pointer acceleration profile gives users full control over the
acceleration behavior at different speeds.
libinput exposes an acceleration function \fIf(x)\fP
where the x-axis is the device speed in device units per millisecond
and the y-axis is the pointer speed.
.PP
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.
Thus the points defining the custom function are:
.EX
(0 * step, f[0]), (1 * step, f[1]), ..., ((n-1) * step, f[n-1])
.EE
When a velocity value does not lie exactly on those points,
a linear interpolation/extrapolation of the two closest points
will be calculated.
.PP
There are 3 custom acceleration functions,
which are used for different movement types:
.TS
tab(;) allbox;
l l l.
Movement type; Uses; supported by
Fallback; Catch-all default movement type; All devices
Motion; Used for pointer motion; All devices
Scroll; Used for scroll movement; Mouse, Touchpad
.TE
.PP
See libinput library documentation for more details:
https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile
.SH BUGS
This driver does not work with \fBOption \*qDevice\*q\fR set to an event
node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR. This can be
usually be worked by using \fBSection \*qInputClass\*q\fR with an
appropriate \fBMatch*\fR statement in the xorg.conf(5).
node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR.
This can be usually be worked by using \fBSection \*qInputClass\*q\fR with an
appropriate \fBMatch*\fR statement in the
.BR xorg.conf (5).
.SH AUTHORS
Peter Hutterer
.SH "SEE ALSO"
Xorg(1), xorg.conf(5), Xserver(1), X(7)
.BR XLibre (1),
.BR xorg.conf (5),
.BR Xserver (1),
.BR X (7)

View File

@@ -1,5 +1,5 @@
project('xf86-input-libinput', 'c',
version: '1.3.0', # bump version in configure.ac
version: '25.0.1',
default_options: ['warning_level=2'],
meson_version: '>= 0.50.0')
@@ -33,7 +33,7 @@ add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
pkgconfig = import('pkgconfig')
dep_xserver = dependency('xorg-server', version: '>= 1.19')
dep_xproto = dependency('xproto')
dep_inputproto = dependency('inputproto', version: '>= 2.2')
dep_inputproto = dependency('inputproto', version: '>= 2.3.99.1')
dep_libinput = dependency('libinput', version: '>= 1.11.0')
config_h = configuration_data()
@@ -41,10 +41,6 @@ config_h.set('PACKAGE_VERSION_MAJOR', driver_version[0])
config_h.set('PACKAGE_VERSION_MINOR', driver_version[1])
config_h.set('PACKAGE_VERSION_PATCHLEVEL', driver_version[2])
if dep_inputproto.version().version_compare('>= 2.3.99.1')
config_h.set('HAVE_INPUTPROTO24', 1)
endif
if cc.has_function('libinput_device_config_scroll_get_button_lock',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_SCROLL_BUTTON_LOCK', 1)
@@ -57,6 +53,21 @@ if cc.has_function('libinput_config_accel_create',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_CUSTOM_ACCEL', 1)
endif
if cc.has_function('libinput_tablet_tool_config_pressure_range_set',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_PRESSURE_RANGE', 1)
endif
if cc.has_function('libinput_device_config_click_set_clickfinger_button_map',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_CLICKFINGER_BUTTON_MAP', 1)
endif
if cc.has_header_symbol('libinput.h', 'LIBINPUT_LED_COMPOSE',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_COMPOSE_AND_KANA', 1)
endif
if cc.has_function('libinput_plugin_system_load_plugins', dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_PLUGINS', 1)
endif
dir_headers = get_option('sdkdir')
if dir_headers == ''
@@ -135,6 +146,8 @@ configure_file(
install_dir: dir_man4
)
install_headers('include/libinput-properties.h', install_dir: dir_headers)
install_data('conf/40-libinput.conf', install_dir: dir_xorg_conf)
# Now generate config.h

View File

@@ -28,12 +28,12 @@
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBINPUT_CFLAGS)
@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
@DRIVER_NAME@_drv_la_LIBADD = $(LIBINPUT_LIBS) libdraglock.la libbezier.la -lm
@DRIVER_NAME@_drv_ladir = @inputdir@
libinput_drv_la_LTLIBRARIES = libinput_drv.la
libinput_drv_la_LDFLAGS = -module -avoid-version
libinput_drv_la_LIBADD = $(LIBINPUT_LIBS) libdraglock.la libbezier.la -lm
libinput_drv_ladir = @inputdir@
@DRIVER_NAME@_drv_la_SOURCES = \
libinput_drv_la_SOURCES = \
xf86libinput.c \
util-macros.h \
util-strings.h \

View File

@@ -22,10 +22,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <assert.h>
#include <math.h>

View File

@@ -22,10 +22,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef BEZIER_H
#define BEZIER_H

View File

@@ -22,10 +22,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "draglock.h"

View File

@@ -22,10 +22,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef DRAGLOCK_H
#define DRAGLOCK_H 1

View File

@@ -23,6 +23,7 @@
*/
#include "config.h"
#define _GNU_SOURCE
#include "util-strings.h"
@@ -121,7 +122,9 @@ strv_from_string(const char *in, const char *separators, size_t *num_elements)
}
size_t strv_len = nelems + 1; /* NULL-terminated */
char **strv = zalloc(strv_len * sizeof *strv);
char **strv = calloc(strv_len, sizeof(*strv));
if (!strv)
return NULL;
size_t idx = 0;
const char *word;

View File

@@ -24,9 +24,6 @@
#pragma once
#include "config.h"
#define _GNU_SOURCE
#include <assert.h>
#include <ctype.h>
#include <errno.h>
@@ -100,47 +97,6 @@ safe_strdup(const char *str)
return s;
}
/**
* Simple wrapper for asprintf that ensures the passed in-pointer is set
* to NULL upon error.
* The standard asprintf() call does not guarantee the passed in pointer
* will be NULL'ed upon failure, whereas this wrapper does.
*
* @param strp pointer to set to newly allocated string.
* This pointer should be passed to free() to release when done.
* @param fmt the format string to use for printing.
* @return The number of bytes printed (excluding the null byte terminator)
* upon success or -1 upon failure. In the case of failure the pointer is set
* to NULL.
*/
__attribute__ ((format (printf, 2, 3)))
static inline int
xasprintf(char **strp, const char *fmt, ...)
{
int rc = 0;
va_list args;
va_start(args, fmt);
rc = vasprintf(strp, fmt, args);
va_end(args);
if ((rc == -1) && strp)
*strp = NULL;
return rc;
}
__attribute__ ((format (printf, 2, 0)))
static inline int
xvasprintf(char **strp, const char *fmt, va_list args)
{
int rc = 0;
rc = vasprintf(strp, fmt, args);
if ((rc == -1) && strp)
*strp = NULL;
return rc;
}
static inline bool
safe_atoi_base(const char *str, int *val, int base)
{
@@ -297,7 +253,10 @@ double_array_from_string(const char *in,
if(!strv)
return result;
double *numv = zalloc(sizeof(double) * nelem);
double *numv = calloc(nelem, sizeof(double));
if (!numv)
goto out;
for (size_t idx = 0; idx < nelem; idx++) {
double val;
if (!safe_atod(strv[idx], &val))
@@ -434,31 +393,3 @@ safe_basename(const char *filename);
char *
trunkname(const char *filename);
/**
* Return a copy of str with all % converted to %% to make the string
* acceptable as printf format.
*/
static inline char *
str_sanitize(const char *str)
{
if (!str)
return NULL;
if (!strchr(str, '%'))
return strdup(str);
size_t slen = min(strlen(str), 512);
char *sanitized = zalloc(2 * slen + 1);
const char *src = str;
char *dst = sanitized;
for (size_t i = 0; i < slen; i++) {
if (*src == '%')
*dst++ = '%';
*dst++ = *src++;
}
*dst = '\0';
return sanitized;
}

File diff suppressed because it is too large Load Diff

View File

@@ -233,6 +233,7 @@ test_filter_meta_passthrough(void)
int i;
rc = draglock_init_from_string(&dl, "10");
assert(rc == 0);
for (i = 0; i < 10; i++) {
button = i;
@@ -259,6 +260,7 @@ test_filter_meta_click_meta_only(void)
int button, press;
rc = draglock_init_from_string(&dl, "10");
assert(rc == 0);
button = 10;
press = 1;
@@ -283,6 +285,7 @@ test_filter_meta(void)
int i;
rc = draglock_init_from_string(&dl, "10");
assert(rc == 0);
for (i = 1; i < 10; i++) {
/* meta down */
@@ -339,6 +342,7 @@ test_filter_meta_extra_click(void)
int i;
rc = draglock_init_from_string(&dl, "10");
assert(rc == 0);
for (i = 1; i < 10; i++) {
/* meta down */
@@ -409,6 +413,7 @@ test_filter_meta_interleaved(void)
int i;
rc = draglock_init_from_string(&dl, "10");
assert(rc == 0);
for (i = 1; i < 10; i++) {
/* meta down */
@@ -467,6 +472,7 @@ test_filter_pairs(void)
int i;
rc = draglock_init_from_string(&dl, "1 11 2 0 3 13 4 0 5 15 6 0 7 17 8 0 9 19");
assert(rc == 0);
for (i = 1; i < 10; i++) {
button = i;