Compare commits

...

60 Commits

Author SHA1 Message Date
Peter Hutterer
449b496a3a xf86-input-libinput 0.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-05 13:40:31 +10:00
Peter Hutterer
d4e0b5420f Fix missing scroll methods default/scroll button property
Even if no scroll method is enabled by default, we still want those
properties.

Introduced in 8d4e03570c.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-01 11:46:33 +10:00
Peter Hutterer
19c91044e4 Use the new unaccelerated valuator ValuatorMask features
SDL Games like openarena rely on relative input that's handled by the DGA code
in the server. That code casts the driver's input data to int and sends it to
the client. libinput does pointer acceleration for us, so sending any deltas
of less than 1 (likely for slow movements) ends up being 0.

Use the new ValuatorMask accelerated/unaccelerated values to pass the
unaccelerated values along, the server can then decide what to do with it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-22 07:42:15 +10:00
Peter Hutterer
3d6afca975 Only init abs axes if we don't have acceleration
A lot of devices (mainly MS input devices) have abs axes on top of the
relative axes. Those axes are usually mute but with the current code we set up
absolute axes for those devices. Relative events are then scaled by the server
which makes the device appear slow.

As an immediate fix always prefer relative axes and only set up absolute axes
if the device has a calibration matrix but no pointer acceleration.
This may mess up other devices where the relative axes are dead, we'll deal
with this when it comes.

https://bugs.freedesktop.org/show_bug.cgi?id=90322

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-22 07:42:15 +10:00
Peter Hutterer
158e3264ce xf86-input-libinput 0.10.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-21 09:52:40 +10:00
Peter Hutterer
006c802630 Group scroll distances into a struct
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-20 14:22:17 +10:00
Peter Hutterer
d6ce065cea Add option "ButtonMapping" (#90206)
With a long entry in the man page to detail what this option does.
Specifically, it's the xorg.conf equivalent to XSetPointerMapping(3), it
doesn't do any physical button remappings, merely the logical ones. If the
physical button isn't mapped to the right logical button by default, that's
either a libiput bug or an xkcd 1172 issue.

X.Org Bug 90206 <http://bugs.freedesktop.org/show_bug.cgi?id=90206>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-04-30 11:34:15 +10:00
Peter Hutterer
b9a2150576 man: add two linebreaks to make things easier to visually parse
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-04-29 09:19:09 +10:00
Peter Hutterer
9356471f3f Move the option parsing into helper functions
No functional changes, though I did move a free() up a bit in the process (see
sendevents parsing).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-04-29 08:51:12 +10:00
Peter Hutterer
d5fa03c343 Add a property for middle button emulation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-04-23 17:48:44 +10:00
Peter Hutterer
446401bea9 xf86-input-libinput 0.9.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-23 12:23:01 +10:00
Peter Hutterer
8d4e03570c Add "libinput something Default" properties
A client or xorg.conf setting may change the property but once changed it
cannot be reset by a client to the original state without knowledge about the
device.

Export the various libinput_...get_default() functions as properties.

https://bugs.freedesktop.org/show_bug.cgi?id=89574

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-18 09:15:40 +10:00
Peter Hutterer
0c5620a29c Add a helper function for making properties
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-18 09:15:40 +10:00
Peter Hutterer
fb50cef700 man: update the property list in the man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-18 09:15:40 +10:00
Peter Hutterer
64a0f870e0 Fix a couple of -Wformat warnings
unsigned int vs int

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-18 09:15:40 +10:00
Peter Hutterer
e362e4dc4c cosmetic: drop duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-16 10:38:07 +10:00
Peter Hutterer
7b3b04b518 xf86-input-libinput 0.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-06 15:32:58 +10:00
Boyan Ding
4ac531bdf6 Initialize variable 'path' to NULL to silence warning
CC       libinput.lo
libinput.c: In function 'xf86libinput_pre_init':
libinput.c:1222:2: warning: 'path' may be used uninitialized in this
function [-Wmaybe-uninitialized]
  free(path);
  ^

Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-06 14:50:38 +10:00
Peter Hutterer
7ec0bf7ae2 Up the scroll dist value for touchpads
For source FINGER and CONTINUOUS, the axis value is the same as relative
motion - but scrolling in X usually doesn't have the same speed as finger
movement, it's a lot coarser.

We don't know ahead of time where we'll get the scroll events from. Set a
default scroll distance of 15 and multiply any wheel clicks we get by this
value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-05 19:07:28 +10:00
Peter Hutterer
2ffd8d14be Apply the configuration before initalizing the property
Otherwise the property contains the device defaults, rather than the xorg.conf
options.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-02 10:43:07 +10:00
Peter Hutterer
e9a0ee69cb Don't unref the device until we're done with it in DEVICE_INIT
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-02 10:42:03 +10:00
Peter Hutterer
fb6506f5ee Add properties to change the click method (#89332)
X.Org Bug 89332 <http://bugs.freedesktop.org/show_bug.cgi?id=89332>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-02-26 17:06:10 +10:00
Peter Hutterer
275c712866 Split out property init into helper functions
Makes the code less messy. Only functional change is that if one property
fails to initialize we'll now continue with the others. Previously the first
failed property would prevent any other property init.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-02-26 16:54:54 +10:00
Peter Hutterer
2455f0d03b Use the new libinput_device_pointer_has_button
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-26 16:09:50 +10:00
Olivier Fourdan
98ae01b9ae Ignore property changes if the device is disabled
If the device is present but disabled, the server will still call into
SetProperty. We don't have a libinput device to back it up in this case,
causing a null-pointer dereference.

This is a bug specific to this driver that cannot easily be fixed. All
other drivers can handle property changes even if no device is present,
here we rely on libinput to make the final call. But without a device
path/fd we don't have a libinput reference.

The protocol doesn't mention this case, so let's pick BadMatch as the
least wrong error code. And put a warning in the log, this needs a
workaround in the client.

Also, if we get here and the device is on, then that's definitely a bug,
warn about that.

https://bugs.freedesktop.org/show_bug.cgi?id=89296

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-26 08:10:24 +10:00
Peter Hutterer
2600a4a352 Fix off-by-one error in buttonmap initialization (#89300)
X.Org Bug 89300 <http://bugs.freedesktop.org/show_bug.cgi?id=89300>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-25 07:50:45 +10:00
Peter Hutterer
278a685c5a xf86-input-libinput 0.7.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-24 14:45:12 +10:00
Peter Hutterer
875f1696b7 Only apply left-handed/scroll button configuration when it's available
https://bugs.freedesktop.org/show_bug.cgi?id=88961

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-04 14:14:13 +10:00
Friedrich Schöller
45e9b6c64b Reapply configuration at DEVICE_ON
The driver ignored my xorg configuration. Maybe I am doing something wrong,
but I tried to track down the error and came up with this solution.

The device is closed after DEVICE_INIT so we need to apply configuration
options at DEVICE_ON.

Signed-off-by: Friedrich Schöller <code@schoeller.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-30 09:47:22 +10:00
Peter Hutterer
dcdf1e24c8 Formatting fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-30 09:47:19 +10:00
Peter Hutterer
64e1b14598 xf86-input-libinput 0.6.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-27 10:08:32 +10:00
Peter Hutterer
e729451bb1 Swap button labels for back/forward to align with linux/input.h
We just forward the kernel buttons, so this should be in the same order.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-27 07:51:34 +10:00
Olivier Fourdan
7d73602c4b Move properties to a separate header
And install the header as part of the SDK, so that applications interfacing
with the libinput driver do not have to copy paste all the properties' names.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-21 11:57:58 +10:00
Peter Hutterer
00b96de351 Revert "libinput-drv: Move properties to a separate header"
Missing the pkg-config file, updated patch coming up.

This reverts commit 8ceed9c73d.
2015-01-21 11:56:35 +10:00
Olivier Fourdan
8ceed9c73d libinput-drv: Move properties to a separate header
And install the header as part of the SDK, so that applications interfacing
with the libinput driver do not have to copy paste all the properties' names.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-21 07:15:48 +10:00
Olivier Fourdan
e4cd6cef91 libinput-drv: Add autogen.sh
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-21 07:13:46 +10:00
Peter Hutterer
7bc662d0b4 Remove unused define
Obsolete since 2348a6812a

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-19 14:36:59 +10:00
Peter Hutterer
a55cb9121a Move the property #defines up
Since they serve as documentation, make them easier to find.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-19 14:36:19 +10:00
Peter Hutterer
efb5cacb25 xf86-input-libinput 0.5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-16 14:39:29 +10:00
Peter Hutterer
2348a6812a Fix for new libinput APIs
Scroll events carry multiple axes.

Left-handed config was renamed to drop the "button" bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-15 13:12:36 +10:00
Peter Hutterer
0c4eaf5480 Support server-side fds
libinput's device handling and server-side fd handling are a bit of a
mismatch, so this is hackier than one would hope for.

The server sets pInfo->fd and the options "fd" and "device".
The server requires pInfo->fd to be the one triggering select(2) to call the
correct pInfo->read_input. We can't pass an fd to use into libinput, all we
have is the open_restricted callback. That callback gives us the context, but
not the pInfo with the fd we want.

The solution:
1) In PreInit, store the patch + fd combination in a driver-wide list. Search
that list for an fd in open_restricted, return the pre-openend fd.

2) Overwrite all devices' pInfo->fd with the libinput epollfd. In this driver
we don't care about which device read_input is called on, we get the correct
pInfo to post events from through the struct libinput_device of the libinput
events.

3) When a device is closed, swap the real fd back in so systemd-logind closes the
right fd.

This saves us worrying about keeping the right refcount on who currently has
the fd set to the libinput fd. We just set it for all devices, let the server
figure out which device to call (the first in inputInfo.devices) and we only
need to remember to swap it back during DEVICE_OFF.

If the server calls close on a pInfo->fd without telling the driver, that's a
bug anyway.

This patch also drops the pInfo->fd = -1 calls, they've been unnecessary since
at least 1.11, possibly earlier.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-12-08 08:36:16 +10:00
Peter Hutterer
bc7bcca342 xf86-input-libinput 0.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 15:18:40 +10:00
Peter Hutterer
e5079cd98e Require libinput 0.7.0
We've required this already anyway, now we have the libinput version to match
though

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 15:12:31 +10:00
Peter Hutterer
200be95ac9 Support absolute pointer devices
Detecting them is a bit of guesswork: if a device is a pointer device and has
a calibration matrix option, then the device must be an abs device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 15:12:31 +10:00
Peter Hutterer
8b5dbd4c01 Split up a really long line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 15:20:41 +10:00
Peter Hutterer
fb5c5b6f85 Move the option parsing into a separate function
No functional changes, makes preinit a bit more digestible.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:52:28 +10:00
Peter Hutterer
182363d674 Change a sigsafe error to xf86IDrvMsg
We don't use the signal handler in this driver, so no need for sigsafe
logging.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:48:56 +10:00
Peter Hutterer
f0b14c6ccc Change the touch IDs to uints
Better overflow behavior, not that we're likely to trigger it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:47:15 +10:00
Peter Hutterer
e92c9f0bad man: fix wrong option name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:45:40 +10:00
Peter Hutterer
dda952fafe Leave the XKB defaults up to the server
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:44:11 +10:00
Peter Hutterer
17302c3352 Allow disabling scroll methods
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:31:30 +10:00
Peter Hutterer
7e3926f2b7 Split sendevent modes property into "available" and "current"
Clients need to know which methods are available, not just which one
is currently set. Export bitmask config options as two properties,
one read-only named "... Available" and one set-able one named "... Enabled"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 11:31:30 +10:00
Peter Hutterer
9ad23dd1cb Split scroll methods property into "available" and "current"
Clients need to know which methods are available, not just which one is
currently set. Export bitmask config options as two properties, one read-only
named "... Available" and one set-able one named "... Enabled"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-28 09:14:24 +10:00
Peter Hutterer
7b2dbdc224 xf86-input-libinput 0.3.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 17:43:23 +10:00
Peter Hutterer
eddc8cb1b2 Don't process events from devices that got removed already
If the driver doesn't have a pInfo reference anymore for a libinput device,
don't bother processing events, the device was already removed. This was
triggered by the libevdev test suite which adds/removes devices very quickly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 11:50:48 +10:00
Peter Hutterer
95597d8070 Drop double empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 11:50:48 +10:00
Peter Hutterer
a323e221a7 Use the button conversion helper for normal button events too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 11:01:25 +10:00
Peter Hutterer
6385974e4d Add support for changing the button-scrolling button
This currently exposes the libinput button name, which isn't ideal. Needs to
be switched to X button numbers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 11:01:25 +10:00
Peter Hutterer
439a244ae7 Add support for switching scroll methods
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 11:00:44 +10:00
Peter Hutterer
4a049ad6f8 Add support for left-handed button orientation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-24 10:50:24 +10:00
8 changed files with 1709 additions and 280 deletions

View File

@@ -21,9 +21,12 @@
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
SUBDIRS = src man
SUBDIRS = src include man
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-libinput.pc
.PHONY: ChangeLog INSTALL
INSTALL:

14
autogen.sh Executable file
View File

@@ -0,0 +1,14 @@
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
exec $srcdir/configure "$@"
fi

View File

@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
[0.2.0],
[0.11.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.6.0])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.14.0])
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
@@ -68,6 +68,8 @@ DRIVER_NAME=libinput
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile
man/Makefile])
man/Makefile
xorg-libinput.pc])
AC_OUTPUT

1
include/Makefile.am Normal file
View File

@@ -0,0 +1 @@
sdk_HEADERS = libinput-properties.h

View File

@@ -0,0 +1,105 @@
/*
* Copyright © 2015 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of Red Hat
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission. Red
* Hat makes no representations about the suitability of this software
* for any purpose. It is provided "as is" without express or implied
* warranty.
*
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _LIBINPUT_PROPERTIES_H_
#define _LIBINPUT_PROPERTIES_H_
/* Tapping enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_TAP "libinput Tapping Enabled"
/* Tapping default enabled/disabled: BOOL, 1 value, read-only */
#define LIBINPUT_PROP_TAP_DEFAULT "libinput Tapping Enabled Default"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
#define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows, read-only*/
#define LIBINPUT_PROP_CALIBRATION_DEFAULT "libinput Calibration Matrix Default"
/* Pointer accel speed: FLOAT, 1 value, 32 bit */
#define LIBINPUT_PROP_ACCEL "libinput Accel Speed"
/* Pointer accel speed: FLOAT, 1 value, 32 bit, read-only*/
#define LIBINPUT_PROP_ACCEL_DEFAULT "libinput Accel Speed Default"
/* Natural scrolling: BOOL, 1 value */
#define LIBINPUT_PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled"
/* Natural scrolling: BOOL, 1 value, read-only */
#define LIBINPUT_PROP_NATURAL_SCROLL_DEFAULT "libinput Natural Scrolling Enabled Default"
/* Send-events mode: BOOL read-only, 2 values in order disabled,
disabled-on-external-mouse */
#define LIBINPUT_PROP_SENDEVENTS_AVAILABLE "libinput Send Events Modes Available"
/* Send-events mode: BOOL, 2 values in order disabled,
disabled-on-external-mouse */
#define LIBINPUT_PROP_SENDEVENTS_ENABLED "libinput Send Events Mode Enabled"
/* Send-events mode: BOOL, 2 values in order disabled,
disabled-on-external-mouse, read-only */
#define LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT "libinput Send Events Mode Enabled Default"
/* Left-handed enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_LEFT_HANDED "libinput Left Handed Enabled"
/* Left-handed enabled/disabled: BOOL, 1 value, read-only */
#define LIBINPUT_PROP_LEFT_HANDED_DEFAULT "libinput Left Handed Enabled Default"
/* Scroll method: BOOL read-only, 3 values in order 2fg, edge, button.
shows available scroll methods */
#define LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE "libinput Scroll Methods Available"
/* Scroll method: BOOL, 3 values in order 2fg, edge, button
only one is enabled at a time at max */
#define LIBINPUT_PROP_SCROLL_METHOD_ENABLED "libinput Scroll Method Enabled"
/* Scroll method: BOOL, 3 values in order 2fg, edge, button
only one is enabled at a time at max, read-only */
#define LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT "libinput Scroll Method Enabled Default"
/* Scroll button for button scrolling: 32-bit int, 1 value */
#define LIBINPUT_PROP_SCROLL_BUTTON "libinput Button Scrolling Button"
/* Scroll button for button scrolling: 32-bit int, 1 value, read-only */
#define LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT "libinput Button Scrolling Button 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"
/* Click method: BOOL, 2 values in order buttonareas, clickfinger
only one enabled at a time at max */
#define LIBINPUT_PROP_CLICK_METHOD_ENABLED "libinput Click Method Enabled"
/* Click method: BOOL, 2 values in order buttonareas, clickfinger
only one enabled at a time at max, read-only */
#define LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT "libinput Click Method Enabled Default"
/* Middle button emulation: BOOL, 1 value */
#define LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED "libinput Middle Emulation Enabled"
/* Middle button emulation: BOOL, 1 value, read-only */
#define LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED_DEFAULT "libinput Middle Emulation Enabled Default"
#endif /* _LIBINPUT_PROPERTIES_H_ */

View File

@@ -12,6 +12,7 @@ libinput \- libinput-based X.Org input driver
\ \ ...
.B EndSection
.fi
.SH NOTE
This is the man page for the X input driver. If you are looking for the
library documentation, go to
@@ -30,6 +31,7 @@ devices are configured through the
directive (refer to __xconfigfile__(__filemansuffix__)) instead of manual
per-device configuration. Devices configured in the
__xconfigfile__(__filemansuffix__) are not hot-plug capable.
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
@@ -48,14 +50,59 @@ The mapping from device node to hardware is system-dependent. Property:
.BI "Option \*qAccelSpeed\*q \*q" float \*q
Sets the pointer acceleration speed within the range [-1, 1]
.TP 7
.BI "Option \*qCalibration\*q \*q" string \*q
.BI "Option \*qButtonMapping\*q \*q" string \*q
Sets the logical button mapping for this device, see
XSetPointerMapping(__libmansuffix__). 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.
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
.B BUTTON MAPPING
for more details.
.TP 7
.BI "Option \*qCalibrationMatrix\*q \*q" string \*q
A string of 9 space-separated floating point numbers.
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.
.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
buttons simultaneously produces a middle mouse button click.
.TP 7
.BI "Option \*qNaturalScrolling\*q \*q" bool \*q
Enables or disables natural scrolling behavior.
.TP 7
.BI "Option \*qScrollButton\*q \*q" int \*q
Designates a button as scroll button. If the
.BI ScrollMethod
is
.BI button
and the button is logically held down, x/y axis movement is converted into
scroll events.
.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.
.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".
@@ -68,7 +115,11 @@ 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
The following properties are provided by the
.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
.B libinput
driver.
.TP 7
@@ -85,9 +136,74 @@ driver.
.BI "libinput Natural Scrolling Enabled"
1 boolean value (8 bit, 0 or 1). 1 enables natural scrolling
.TP 7
.BI "libinput Send Events Mode"
1 32-bit value, defines the sendevent mode. See the libinput documentation
for the allowed values.
.BI "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.
.TP 7
.BI "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.
.TP 7
.BI "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 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"
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 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 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"
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 Middle Emulation Enabled"
1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or
disabled.
.TP7
.PP
The above properties have a
.BI "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.
The
.B ButtonMapping
option adjusts the logical button mapping, it does not affect how a physical
button is mapped to a logical button.
.PP
Traditionally, a device was set to left-handed button mode by applying a
button mapping of
.B "\*q3 2 1 ...\*q"
On systems using the
.B libinput
__xservername__ input driver it is recommended to use the
.B LeftHanded
option instead.
.PP
The
.B libinput
__xservername__ input driver does not use the button mapping after setup.
Use XSetPointerMapping(__libmansuffix__) to modify the button mapping at
runtime.
.SH AUTHORS
Peter Hutterer

File diff suppressed because it is too large Load Diff

6
xorg-libinput.pc.in Normal file
View File

@@ -0,0 +1,6 @@
sdkdir=@sdkdir@
Name: xorg-libinput
Description: X.Org libinput input driver.
Version: @PACKAGE_VERSION@
Cflags: -I${sdkdir}