Compare commits

...

55 Commits

Author SHA1 Message Date
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
Peter Hutterer
ef948537e1 xf86-input-libinput 0.2.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:54:02 +10:00
Peter Hutterer
576da9db26 Hook up the libinput log handler
Let the server filter based on the verbosity levels in the server, so map
ERROR to -1 (always), INFO to 3 (default verbosity) and DEBUG to 10.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:40:58 +10:00
Peter Hutterer
2eb01498bd Add an explanatory comment for the disabled ptraccel
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:40:58 +10:00
Peter Hutterer
a4fb161c3e Allow re-enabling of the sendevents configuration
When re-enabling the device, the mode is 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:40:58 +10:00
Peter Hutterer
15291e53b7 Update the README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:40:58 +10:00
Peter Hutterer
d9c212d266 Init the right number of buttons for pointer devices
This only makes room for the highest button number present on the device, it
doesn't cater for devices with 'holes'. i.e. if a device has only BTN_BACK, it
will initialize buttons for all below too.

Which is also evdev's current behavior.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:40:58 +10:00
Peter Hutterer
d48f437aa9 Replace hardcoded button number with one we can calculate
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:39:50 +10:00
Peter Hutterer
84f301f7e3 Fix loop condition
Use the passed-in value, not the global constant.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-19 14:39:50 +10:00
Peter Hutterer
6f06b1dd1d Set the XI type for the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-18 13:37:39 +10:00
Peter Hutterer
fdbf7eaf4b man: add missing Makefile.am 2014-10-05 22:48:30 +10:00
Peter Hutterer
2b6c485117 Store the data in the local options, then apply all at once
Less code this way, though if we somehow sneak in a bad option we get the
error for it every time we update any property.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:42:31 +10:00
Peter Hutterer
246200cbdc Apply all config options on DEVICE_ON
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:36:10 +10:00
Peter Hutterer
fb41458a93 Expose all config options as xorg.conf options
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:36:10 +10:00
Peter Hutterer
d9d2e9a501 Add a man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:25:20 +10:00
Peter Hutterer
0a58edd3f6 Add a couple of general properties that all drivers should support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:25:20 +10:00
Peter Hutterer
8d6019c786 Expose properties for the various configuration settings.
The property support isn't ideal, the server relies on the driver to check
first if a setting is possible, applying the setting itself cannot fail.
Thus we can't just check the libinput config status code, which matters mostly
in the sendevents property where we simply check that only a single bit is set
and that the supported modes are equal or more to the requested mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-26 14:23:28 +10:00
Peter Hutterer
532fe35522 Require libinput 0.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-24 15:59:00 +10:00
Peter Hutterer
65a40e2cfc Add a rudimentary README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-07 10:04:42 +10:00
Peter Hutterer
7522884a9e Drop some mention of evdev
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-07 09:48:46 +10:00
Peter Hutterer
ef5f0295e7 Ship an example config snippet
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-07 09:48:32 +10:00
Peter Hutterer
adb4963109 Replace AC_PROG_LIBTOOL with LT_INIT
Former is deprecated in favor of the latter.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-24 16:55:44 +10:00
11 changed files with 1509 additions and 63 deletions

View File

@@ -19,12 +19,14 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Provide an sdk location that is writable by the evdev module
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
SUBDIRS = src
SUBDIRS = src include man
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-libinput.pc
.PHONY: ChangeLog INSTALL
INSTALL:
@@ -34,3 +36,5 @@ ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL
EXTRA_DIST = conf/99-libinput.conf README.md

55
README.md Normal file
View File

@@ -0,0 +1,55 @@
xf86-input-libinput - a libinput-based X driver
===============================================
The official repository for this driver is
http://cgit.freedesktop.org/xorg/driver/xf86-input-libinput/
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
beyond.
***WARNING: misconfiguration of an X input driver may leave you without
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:
http://www.freedesktop.org/wiki/Software/libinput/
To build the X server from source:
http://www.x.org/wiki/Building_the_X_Window_System/
Building
--------
To build this driver:
autoreconf -vif
./configure --prefix=$HOME/build
make && make install
Note that this assumes the same prefix as used in "Building the X Window
System" above, adjust as required. If you want a system install, use a
prefix of */usr*.
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 "libinput" component of wayland:
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland
Bugs in this driver go to the "Input/libinput" component of xorg:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

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

6
conf/99-libinput.conf Normal file
View File

@@ -0,0 +1,6 @@
# Use the libinput driver for all event devices
Section "InputClass"
Identifier "libinput"
Driver "libinput"
MatchDevicePath "/dev/input/event*"
EndSection

View File

@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
[0.1.2],
[0.7.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
# Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
LT_INIT
# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
@@ -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.4.0])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.8.0])
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
@@ -68,5 +68,8 @@ DRIVER_NAME=libinput
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([Makefile
src/Makefile])
include/Makefile
src/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,61 @@
/*
* 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"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
#define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
/* Pointer accel speed: FLOAT, 1 value, 32 bit */
#define LIBINPUT_PROP_ACCEL "libinput Accel Speed"
/* Natural scrolling: BOOL, 1 value */
#define LIBINPUT_PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled"
/* 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"
/* Left-handed enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_LEFT_HANDED "libinput Left Handed Enabled"
/* 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 button for button scrolling: 32-bit int, 1 value */
#define LIBINPUT_PROP_SCROLL_BUTTON "libinput Button Scrolling Button"
#endif /* _LIBINPUT_PROPERTIES_H_ */

37
man/Makefile.am Normal file
View File

@@ -0,0 +1,37 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
drivermandir = $(DRIVER_MAN_DIR)
driverman_PRE = $(DRIVER_NAME).man
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
EXTRA_DIST = $(DRIVER_NAME).man
CLEANFILES = $(driverman_DATA)
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

115
man/libinput.man Normal file
View File

@@ -0,0 +1,115 @@
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH LIBINPUT __drivermansuffix__ __vendorversion__
.SH NAME
libinput \- libinput-based X.Org input driver
.SH SYNOPSIS
.nf
.B "Section \*qInputDevice\*q"
.BI " Identifier \*q" devname \*q
.B " Driver \*qlibinput\*q"
.BI " Option \*qDevice\*q \*q" devpath \*q
\ \ ...
.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
.BI http://wayland.freedesktop.org/libinput/doc/
.SH DESCRIPTION
.B libinput
is an __xservername__ 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 __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
section only covers configuration details specific to this driver.
.PP
The following driver
.B Options
are supported:
.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.
The mapping from device node to hardware is system-dependent. Property:
"Device Node" (read-only).
.TP 7
.BI "Option \*qAccelSpeed\*q \*q" float \*q
Sets the pointer acceleration speed within the range [-1, 1]
.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 \*qLeftHanded\*q \*q" bool \*q
Enables left-handed button orientation, i.e. swapping left and right buttons.
.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".
.TP 7
.BI "Option \*qTapping\*q \*q" bool \*q
Enables or disables tap-to-click behavior.
.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.
.SH SUPPORTED PROPERTIES
The following properties are provided by the
.B libinput
driver.
.TP 7
.BI "libinput Tapping Enabled"
1 boolean value (8 bit, 0 or 1). 1 enables tapping
.TP 7
.BI "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 Accel Speed"
1 32-bit float value, defines the pointer speed. Value range -1, 1
.TP 7
.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.
.SH AUTHORS
Peter Hutterer
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)

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}