https://wiki.archlinux.org/api.php?action=feedcontributions&user=Cqz&feedformat=atomArchWiki - User contributions [en]2024-03-28T12:53:21ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Libinput&diff=747872Libinput2022-09-23T07:55:59Z<p>Cqz: /* Configuration */ remove unmatched parenthesis</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Input devices]]<br />
[[ja:Libinput]]<br />
[[zh-hans:Libinput]]<br />
{{Related articles start}}<br />
{{Related|Xorg}}<br />
{{Related|Touchpad Synaptics}}<br />
{{Related|Wayland}}<br />
{{Related articles end}}<br />
<br />
From the [https://freedesktop.org/wiki/Software/libinput/ libinput] wiki page: <br />
<br />
:libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction to minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.<br />
<br />
The X.Org input driver supports most regular [[Xorg#Input devices|input devices]]. Particularly notable is the project's goal to provide advanced support for touch (multitouch and gesture) features of touchpads and touchscreens. See the [https://wayland.freedesktop.org/libinput/doc/latest/ libinput documentation] for more information.<br />
<br />
== Installation ==<br />
<br />
If you installed either [[Xorg]] or [[Wayland]], then Libinput should already be installed as a dependency; there are no necessary extra packages.<br />
<br />
* For [[Wayland]], the {{pkg|libinput}} package should be installed as a dependency of any graphical environment you use that has Wayland, and no additional driver is needed.<br />
* For [[Xorg]], {{Pkg|xf86-input-libinput}} is also a dependency. It is "a thin wrapper around libinput and allows for libinput to be used for input devices in X. This driver can be used as as drop-in replacement for evdev and synaptics." [https://freedesktop.org/wiki/Software/libinput/]. It replaces other packages used for input with X (i.e., those prefixed with {{ic|xf86-input-}}).<br />
<br />
You may want to install {{Pkg|xorg-xinput}} to be able to change settings at runtime.<br />
<br />
== Configuration ==<br />
<br />
For [[Wayland]], there is no libinput configuration file. The configurable options depend on the progress of your desktop environment's support for them; see [[#Graphical tools]]. To configure options that your desktop environment does not yet support (e.g. touchpad scroll speed on [[GNOME]]), {{Aur|libinput-config-git}} may be used as a work-around. Available options for that tool are documented in the [https://gitlab.com/warningnonpotablewater/libinput-config libinput-config README].<br />
<br />
For [[Xorg]], a default configuration file for the wrapper is installed to {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}}. No extra configuration is necessary for it to autodetect keyboards, touchpads, trackpointers and supported touchscreens.<br />
<br />
=== Via xinput ===<br />
<br />
First, execute:<br />
<br />
# libinput list-devices<br />
<br />
It will output the devices on the system and their respective features supported by libinput.<br />
<br />
After a [[restart]] of the graphical environment, the devices should be managed by libinput with default configuration, if no other drivers are configured to take precedence.<br />
<br />
See {{man|4|libinput}} for general options to set and information about allowable values. The ''xinput'' tool is used to view or change options available for a particular device at runtime. For example:<br />
<br />
$ xinput list<br />
<br />
to view all devices and determine their names and numbers. In the following, {{ic|''device''}} is either the name or number identifying the device to operate with.<br />
<br />
$ xinput list-props ''device''<br />
<br />
to view and <br />
<br />
$ xinput set-prop ''device'' ''option'' ''setting''<br />
<br />
to change a setting. {{ic|''option''}} can be either the number or the name of the option. For example, to set both options of libinput Click Method Enabled (303), either of the following can be issued:<br />
<br />
$ xinput set-prop 14 303 1 1<br />
<br />
or <br />
<br />
$ xinput set-prop 14 "libinput Click Method Enabled" 1 1<br />
<br />
=== Via Xorg configuration file ===<br />
<br />
See [[Xorg#Using .conf files]] for permanent option settings. [[Logitech Marble Mouse#libinput]] and [[#Tapping button re-mapping]] illustrate examples.<br />
<br />
Alternative drivers for [[Xorg#Input devices]] can generally be installed in parallel. If you intend to switch driver for a device to use libinput, ensure no legacy configuration files {{ic|/etc/X11/xorg.conf.d/}} for other drivers take precedence.<br />
<br />
{{Tip|<br />
* If you have libinput and synaptics installed in parallel with default configuration (i.e. no files in {{ic|/etc/X11/xorg.conf.d}} for either), synaptics will take precedence due to its higher numeric order {{ic|70-}} in the default installation directory. To avoid this, you can symlink the default libinput configuration ({{ic|40-libinput.conf}}) to {{ic|/etc/X11/xorg.conf.d/}} where directory search order precedence over {{ic|70-synaptics.conf}} will take place instead:<br />
<br />
# ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf<br />
<br />
If you ''do'' have {{ic|/etc/X11/xorg.conf.d/}} configuration files for both, the libinput file must be ordered second; see [[Xorg#Using .conf files]]. If you want to disable libinput (and fallback to older drivers) - just remove the previously created symbolic link from {{ic|/etc/X11/xorg.conf.d/}}.<br />
* If a configuration file seems to have no effect at all, check that it is readable by unprivileged users.}}<br />
<br />
One way to check which devices are managed by libinput is the [[Xorg#General|xorg logfile]]. For example, the following:<br />
<br />
{{hc|$ grep -e "Using input driver 'libinput'" ''/path/to/Xorg.0.log''|<br />
[ 28.799] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.847] (II) Using input driver 'libinput' for 'Video Bus'<br />
[ 28.853] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.860] (II) Using input driver 'libinput' for 'Sleep Button'<br />
[ 28.872] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'<br />
[ 28.878] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'<br />
[ 28.886] (II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'<br />
[ 28.895] (II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'<br />
}}<br />
<br />
is a notebook without any configuration files in {{ic|/etc/X11/xorg.conf.d/}}, i.e. devices are auto-detected.<br />
<br />
Of course you can elect to use an alternative driver for one device and libinput for others. A number of factors may influence which driver to use. For example, in comparison to [[Touchpad Synaptics]] the libinput driver has fewer options to customize touchpad behaviour to one's own taste, but far more programmatic logic to process multitouch events (e.g. palm detection as well). Hence, it makes sense to try the alternative, if you are experiencing problems on your hardware with one driver or the other.<br />
<br />
Custom configuration files should be placed in {{ic|/etc/X11/xorg.conf.d/}} and following a widely used naming schema {{ic|30-touchpad.conf}} is often chosen as filename.<br />
<br />
{{Tip|Have a look at CONFIGURATION DETAILS in {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}} for guidance and refer to the {{man|4|libinput}} manual page for a detailed description of available configuration options.}}<br />
<br />
A basic configuration should have the following structure:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "devname"<br />
Driver "libinput"<br />
...<br />
EndSection<br />
}}<br />
<br />
You may define as many sections as you like in a single configuration file (usually one per input device).<br />
To configure the device of your choice specify a filter by using one of the available filters from {{man|5|xorg.conf|INPUTCLASS_SECTION}}, e.g.<br />
<br />
* {{ic|MatchIsPointer "on"}} (trackpoint)<br />
* {{ic|MatchIsKeyboard "on"}}<br />
* {{ic|MatchIsTouchpad "on"}}<br />
* {{ic|MatchIsTouchscreen "on"}}<br />
<br />
The input device can then be configured with any of the lines of {{man|4|libinput|CONFIGURATION_DETAILS}}. Common options include:<br />
<br />
* {{ic|Option "Tapping" "on"}}: tapping a.k.a. tap-to-click<br />
* {{ic|Option "ClickMethod" "clickfinger"}}: trackpad no longer has middle and right button areas and instead two-finger click is a context click and three-finger click is a middle click, see the [https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html#clickfinger-behavior docs].<br />
* {{ic|Option "NaturalScrolling" "true"}}: natural (reverse) scrolling<br />
* {{ic|Option "ScrollMethod" "edge"}}: edge (vertical) scrolling<br />
<br />
Bear in mind that some of them may only apply to certain devices and you will need to restart X for changes to take effect.<br />
<br />
=== Graphical tools ===<br />
<br />
There are different GUI tools:<br />
<br />
* [[GNOME]]:<br />
** Control center has a basic UI. See [[GNOME#Mouse and touchpad]].<br />
** {{pkg|gnome-tweaks}} offers some additional settings.<br />
* [[Cinnamon]]:<br />
** Similar to the GNOME UI, with more options.<br />
* [[MATE]]:<br />
** Mouse option available in the settings panel. Also accessible using {{ic|mate-mouse-properties}}<br />
* [[KDE Plasma]] 5:<br />
** Keyboard, mouse and controller devices can be configured from System Settings.<br />
* [[Xfce]]:<br />
** Configured from the Mouse and Touchpad submenu in {{pkg|xfce4-settings}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Tapping button re-mapping ===<br />
<br />
Swapping two- and three-finger tap for a touchpad is a straight forward example. Instead of the default three-finger tap for pasting you can configure two-finger tap pasting by setting the {{ic|TappingButtonMap}} option in your [[Xorg]] configuration file. To set 1/2/3-finger taps to left/right/middle set {{ic|TappingButtonMap}} to {{ic|lrm}}, for left/middle/right set it to {{ic|lmr}}.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "touchpad"<br />
Driver "libinput"<br />
MatchIsTouchpad "on"<br />
Option "Tapping" "on"<br />
Option "TappingButtonMap" "lmr"<br />
EndSection}}<br />
<br />
Remember to remove {{ic|MatchIsTouchpad "on"}} if your device is not a touchpad and adjust the {{ic|Identifier}} accordingly.<br />
<br />
=== Manual button re-mapping ===<br />
<br />
For some devices it is desirable to change the button mapping. A common example is the use of a thumb button instead of the middle button (used in X11 for pasting) on mice where the middle button is part of the mouse wheel. You can query the current button mapping via:<br />
<br />
$ xinput get-button-map ''device''<br />
<br />
where ''device'' is either the device name or the device ID, as returned by {{ic|xinput list}}. You can freely permutate the button numbers and write them back. Example:<br />
<br />
$ xinput set-button-map ''device'' 1 6 3 4 5 0 7<br />
<br />
In this example, we mapped button 6 to be the middle button and disabled the original middle button by assigning it to button 0. <br />
For more information, please read about "ButtonMapping" section in {{man|4|libinput}}.<br />
This may also be used for [[Wayland]], but be aware both the ''device'' number and its button-map will be different. Hence, settings are not directly interchangeable. <br />
<br />
{{Tip|You can use ''xev'' (from the {{Pkg|xorg-xev}} package) to find out which physical button is currently mapped to which ID.}}<br />
<br />
{{Style|The rest of this section is overly complicated with parameters for different devices. Unique ideas should be split into subsections to make it more readable.}}<br />
<br />
Some devices occur several times under the same device name, with a different amount of buttons exposed. The following is an example for reliably changing the button mapping for a Logitech Revolution MX mouse via [[xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<nowiki><br />
...<br />
for i in $(xinput list | grep "Logitech USB Receiver" | perl -n -e'/id=(\d+)/ && print "$1\n"')<br />
do if xinput get-button-map "$i" 2>/dev/null| grep -q 20; then<br />
xinput set-button-map "$i" 1 17 3 4 5 8 7 6 9 10 11 12 13 14 15 16 2 18 19 20<br />
fi<br />
done<br />
...<br />
</nowiki>}}<br />
<br />
You could also use the Xorg configure file to do that. The trackball used in this example has a physical scroll wheel, for those devices without that may need to refer the configure for [[Logitech_Marble_Mouse#Configuration_file|Logitech Marble Mouse]].<br />
The physical buttons in Kensington Slimblade Trackball layout are:<br />
{{bc|<nowiki><br />
-----------<br />
|2(M)|8(S)|<br />
-----------<br />
|1(L)|3(R)|<br />
-----------<br />
</nowiki>}}<br />
So for the left hand user, you may use the configure below, although you do not have neither a scroll up button nor scroll down button, you cannot disable them in configure or some application will not response to the action of the wheel.<br />
{{bc|<nowiki><br />
-----------<br />
|2(N)|8(M)|<br />
-----------<br />
|1(R)|3(L)|<br />
-----------<br />
</nowiki>}}<br />
{{hc|/etc/X11/xorg.conf|<nowiki><br />
Section "InputClass"<br />
Identifier "Trackball"<br />
MatchProduct "Kensington Kensington Slimblade Trackball"<br />
MatchProduct "Trackball"<br />
Driver "libinput"<br />
Option "ButtonMapping" "3 0 1 4 5 6 7 8 2"<br />
EndSection<br />
</nowiki>}}<br />
<br />
=== Change touchpad sensitivity ===<br />
<br />
The method of finding the correct thresholds for when libinput registers a touch as DOWN and back UP again can be found [https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#touchpad-pressure-hwdb] in the upstream documentation.<br />
<br />
Custom touchpad pressure values can be set via temporary local device quirks. See [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].<br />
<br />
{{Note|Quirks are an internal API and are not guaranteed to work in future libinput versions. Between versions 1.11 and 1.12, udev rules [https://wayland.freedesktop.org/libinput/doc/1.11.3/udev_config.html#hwdb] were replaced by {{ic|.quirk}} files [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].}}<br />
<br />
=== Disable touchpad ===<br />
<br />
To disable the touchpad, first get its name with {{ic|xinput list}} and then disable it with {{ic|xinput disable ''name''}}.<br />
<br />
{{Note|<br />
* It is more robust to disable it by name than by ID number. The devices may be renumbered.<br />
* It will be necessary to quote the name if it contains spaces.<br />
}}<br />
<br />
To make it permanent, see [[Autostarting]].<br />
<br />
To toggle, write a script such as [https://github.com/lahwaacz/Scripts/blob/master/toggle-touchpad.sh].<br />
<br />
=== Gestures ===<br />
<br />
While the libinput driver already contains logic to process advanced multitouch events like swipe and pinch [https://wayland.freedesktop.org/libinput/doc/latest/gestures.html gestures], the [[Desktop environment]] or [[Window manager]] might not have implemented actions for all of them yet.<br />
<br />
==== libinput-gestures ====<br />
<br />
For [[w:Extended_Window_Manager_Hints|EWMH]] (see also [https://www.freedesktop.org/wiki/Specifications/wm-spec/ wm-spec]) compliant window managers, the [https://github.com/bulletmark/libinput-gestures libinput-gestures] utility can be used meanwhile. The program reads libinput gestures (through {{ic|libinput debug-events}}) from the touchpad and maps them to gestures according to a configuration file. Hence, it offers some flexibility within the boundaries of libinput's built-in recognition.<br />
<br />
To use it, install the {{Aur|libinput-gestures}} package. You can use the default system-wide configured swipe and pinch gestures or define your own in a personal configuration file, see the [https://github.com/bulletmark/libinput-gestures/blob/master/README.md README] for details.<br />
<br />
If using [[touchegg]], uninstall the {{Aur|libinput-gestures}} package to prevent conflicts (see [https://github.com/JoseExposito/gnome-shell-extension-x11gestures/issues/41]).<br />
<br />
==== fusuma ====<br />
<br />
[https://github.com/iberianpig/fusuma Fusuma] is a multitouch gesture recognizer, written in [[Ruby]], which can be used as an alternative to libinput-gestures.<br />
<br />
Install the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]]:<br />
<br />
$ gem install fusuma<br />
<br />
Alternatively, there is also {{AUR|ruby-fusuma}}.<br />
<br />
Other than the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]] gem you have to install the {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] or one between the {{pkg|xdotool}} (for X) and {{AUR|ydotool}} (for Wayland). Other alternatives are listed [https://github.com/iberianpig/fusuma#alternatives-to-xdotool here].<br />
<br />
{{Tip|The {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] supports both X and Wayland}}<br />
<br />
Then in {{ic|~/.config/fusuma/config.yml}} you have to set something like:<br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
sendkey: 'LEFTALT+RIGHT'<br />
right: <br />
sendkey: 'LEFTALT+LEFT'<br />
up: <br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
down: <br />
sendkey: 'LEFTALT+TAB'<br />
pinch:<br />
in:<br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
out:<br />
sendkey: 'LEFTALT+TAB'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Or for {{ic|xdotool}}: <br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
command: 'xdotool key alt+Right'<br />
right: <br />
command: 'xdotool key alt+Left'<br />
up: <br />
command: 'xdotool key ctrl+shift+plus'<br />
down: <br />
command: 'xdotool key ctrl+minus'<br />
pinch:<br />
in:<br />
command: 'xdotool key ctrl+shift+plus'<br />
out:<br />
command: 'xdotool key ctrl+minus'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Same thing for {{ic|ydotool}}.<br />
<br />
The swipe threshold is important for not swiping back too many pages. <br />
<br />
Notice that the configure is for three fingers swipe. Two fingers swipe is not supported [https://github.com/iberianpig/fusuma/issues/104#issuecomment-434742767].<br />
<br />
==== Gebaar ====<br />
<br />
[https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar] is another gesture recognizer.<br />
Unlike Fusuma, it does not support pinching (support is planned in the future though) and thresholds, but in addition to swiping left, right, up and down with 3/4 fingers, it also supports diagonal swipes, which Fusuma does not.<br />
<br />
There is a fork of gebaar at [https://github.com/Osleg/gebaar-libinput Gebaar] which could be installed through {{AUR|gebaar-libinput-git}} which supports pinch gestures and adds additional features to original gebaar. Take in mind that this version is currently under active development and introduces configuration changes which makes it incompatable to original [https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar]<br />
<br />
==== GnomeExtendedGestures ====<br />
<br />
For deeper integration with GNOME, there is [https://github.com/mpiannucci/GnomeExtendedGestures GnomeExtendedGestures] ({{Aur|gnome-shell-extension-extended-gestures-git}}). Three finger horizontal and vertical gestures can be configured to perform gnome-shell actions (such as toggling the application overview or cycling between them).<br />
<br />
=== Scroll with mouse by holding a button ===<br />
<br />
There is a nice trick to optimize scrolling with a mouse or trackball by holding a mouse button (like right or middle button, or some other if the mouse has more buttons) and moving the mouse. Very useful in case your mouse does not have the mouse wheel (often the case with the trackballs). To do that one has to set {{ic|ScrollMethod}} to {{ic|button}} and specify the mouse button in the {{ic|ScrollButton}} option for the action. Here is an example for configuration to achieve that:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/00-mouse.conf|<br />
Section "InputClass"<br />
Identifier "system-mouse"<br />
MatchIsPointer "on"<br />
Option "ScrollMethod" "button"<br />
Option "ScrollButton" "3"<br />
EndSection<br />
}}<br />
<br />
=== Mouse wheel scrolling speed scaling ===<br />
<br />
For some mouses, especially when using on a [[HiDPI]] desktop, the wheel scrolls too slow. A [https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/12 patch] is submitted to libinput but it has not been accepted. There is a third-party [https://github.com/archlinuxcn/repo/tree/d0eb728b38450b47a4913539193a58fb523cc255/archlinuxcn/xf86-input-libinput-oldherl xf86-input-libinput] that incoperates this patch.<br />
<br />
This patch introduces a new property {{ic|libinput Scroll Distance Scale}} to mouses, and you can set a scaling factor like<br />
<br />
$ xinput --set-prop 'RAPOO Rapoo 2.4G Wireless Device' 'libinput Scroll Distance Scale' 2.5 2.5<br />
<br />
where the {{ic|RAPOO Rapoo 2.4G Wireless Device}} is the name of your mouse device, listed in {{ic|xinput --list}}. {{ic|2.5 2.5}} are the scaling factors, for x- and y-axis, respectively.<br />
<br />
Alternatively, install {{Aur|libinput-multiplier}} and restart [[Xorg]], then enlarge y-axis scroll distance to 6 times by<br />
<br />
$ echo 6 > /tmp/libinput_discrete_deltay_multiplier<br />
<br />
Here is an [https://github.com/tkkcc/libinput_patch#change-with-focused-window example] to modify the scaling factor upon focusing change<br />
<br />
== Troubleshooting ==<br />
<br />
First, see whether executing {{ic|libinput debug-events}} can support you in debugging the problem, see {{man|1|libinput-debug-events}} for options.<br />
<br />
Some inputs require kernel support. The tool ''evemu-describe'' from the {{Pkg|evemu}} package can be used to check: <br />
<br />
Compare the output of [http://ix.io/m6b software supported input trackpad driver] with [https://github.com/whot/evemu-devices/blob/master/touchpads/SynPS2%20Synaptics%20TouchPad-with-scrollbuttons.events a supported trackpad]. i.e. a couple of ABS_ axes, a couple of ABS_MT axes and no REL_X/Y axis. For a clickpad the {{ic|INPUT_PROP_BUTTONPAD}} property should also be set, if it is supported.<br />
<br />
=== Touchpad not working in GNOME ===<br />
<br />
Ensure the touchpad events are being sent to the GNOME desktop by running the following command:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled<br />
<br />
Additionally, GNOME may override certain behaviors, like turning off Tapping and forcing Natural Scrolling. In this case the settings must be adapted using GNOMEs {{ic|gsettings}} command line tool or a graphical frontend of your choice. For example if you wish to enable ''Tapping'' and disable ''Natural Scrolling'' for your user, adjust the touchpad key-values like the following:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false<br />
<br />
=== Inertial scrolling does not work in KDE ===<br />
<br />
The feature is currently not implemented, see [https://bugs.kde.org/show_bug.cgi?id=456383 KDE bug 456383]. As a workaround for Chromium-based browsers, install the [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] extension.<br />
<br />
== See also ==<br />
<br />
* [https://wayland.freedesktop.org/libinput/doc/latest/index.html libinput Wayland documentation]<br />
* [https://archive.fosdem.org/2015/schedule/event/libinput/attachments/slides/591/export/events/attachments/libinput/slides/591/libinput_xorg.pdf FOSDEM 2015 - libinput] - Hans de Goede on goals and plans of the project<br />
* [https://who-t.blogspot.com.au/ Peter Hutterer's Blog] - numerous posts on libinput from one of the project's hackers<br />
* [https://www.youtube.com/watch?v=HllUoT_WE7Y Talk by the primary libinput maintainer] outlining the history and state (as of 2020) of Linux input device handling<br />
* [https://who-t.blogspot.com/2018/07/why-its-not-good-idea-to-handle-evdev.html Blog post by the libinput maintainer] outlining the rationale for libinput</div>Cqzhttps://wiki.archlinux.org/index.php?title=Libinput&diff=747637Libinput2022-09-21T05:19:01Z<p>Cqz: /* Configuration */ Added links and discussion of libinput-config as a work-around for missing libinput configuration options under Wayland</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Input devices]]<br />
[[ja:Libinput]]<br />
[[zh-hans:Libinput]]<br />
{{Related articles start}}<br />
{{Related|Xorg}}<br />
{{Related|Touchpad Synaptics}}<br />
{{Related|Wayland}}<br />
{{Related articles end}}<br />
<br />
From the [https://freedesktop.org/wiki/Software/libinput/ libinput] wiki page: <br />
<br />
:libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction to minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.<br />
<br />
The X.Org input driver supports most regular [[Xorg#Input devices|input devices]]. Particularly notable is the project's goal to provide advanced support for touch (multitouch and gesture) features of touchpads and touchscreens. See the [https://wayland.freedesktop.org/libinput/doc/latest/ libinput documentation] for more information.<br />
<br />
== Installation ==<br />
<br />
If you installed either [[Xorg]] or [[Wayland]], then Libinput should already be installed as a dependency; there are no necessary extra packages.<br />
<br />
* For [[Wayland]], the {{pkg|libinput}} package should be installed as a dependency of any graphical environment you use that has Wayland, and no additional driver is needed.<br />
* For [[Xorg]], {{Pkg|xf86-input-libinput}} is also a dependency. It is "a thin wrapper around libinput and allows for libinput to be used for input devices in X. This driver can be used as as drop-in replacement for evdev and synaptics." [https://freedesktop.org/wiki/Software/libinput/]. It replaces other packages used for input with X (i.e., those prefixed with {{ic|xf86-input-}}).<br />
<br />
You may want to install {{Pkg|xorg-xinput}} to be able to change settings at runtime.<br />
<br />
== Configuration ==<br />
<br />
For [[Wayland]], there is no libinput configuration file. The configurable options depend on the progress of your desktop environment's support for them; see [[#Graphical tools]]. To configure options that your desktop environment does not yet support (e.g., touchpad scroll speed on [[GNOME]]), {{Aur|libinput-config-git}} may be used as a work-around (available options are documented in the libinput-config [https://gitlab.com/warningnonpotablewater/libinput-config README]).<br />
<br />
For [[Xorg]], a default configuration file for the wrapper is installed to {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}}. No extra configuration is necessary for it to autodetect keyboards, touchpads, trackpointers and supported touchscreens.<br />
<br />
=== Via xinput ===<br />
<br />
First, execute:<br />
<br />
# libinput list-devices<br />
<br />
It will output the devices on the system and their respective features supported by libinput.<br />
<br />
After a [[restart]] of the graphical environment, the devices should be managed by libinput with default configuration, if no other drivers are configured to take precedence.<br />
<br />
See {{man|4|libinput}} for general options to set and information about allowable values. The ''xinput'' tool is used to view or change options available for a particular device at runtime. For example:<br />
<br />
$ xinput list<br />
<br />
to view all devices and determine their names and numbers. In the following, {{ic|''device''}} is either the name or number identifying the device to operate with.<br />
<br />
$ xinput list-props ''device''<br />
<br />
to view and <br />
<br />
$ xinput set-prop ''device'' ''option'' ''setting''<br />
<br />
to change a setting. {{ic|''option''}} can be either the number or the name of the option. For example, to set both options of libinput Click Method Enabled (303), either of the following can be issued:<br />
<br />
$ xinput set-prop 14 303 1 1<br />
<br />
or <br />
<br />
$ xinput set-prop 14 "libinput Click Method Enabled" 1 1<br />
<br />
=== Via Xorg configuration file ===<br />
<br />
See [[Xorg#Using .conf files]] for permanent option settings. [[Logitech Marble Mouse#libinput]] and [[#Tapping button re-mapping]] illustrate examples.<br />
<br />
Alternative drivers for [[Xorg#Input devices]] can generally be installed in parallel. If you intend to switch driver for a device to use libinput, ensure no legacy configuration files {{ic|/etc/X11/xorg.conf.d/}} for other drivers take precedence.<br />
<br />
{{Tip|<br />
* If you have libinput and synaptics installed in parallel with default configuration (i.e. no files in {{ic|/etc/X11/xorg.conf.d}} for either), synaptics will take precedence due to its higher numeric order {{ic|70-}} in the default installation directory. To avoid this, you can symlink the default libinput configuration ({{ic|40-libinput.conf}}) to {{ic|/etc/X11/xorg.conf.d/}} where directory search order precedence over {{ic|70-synaptics.conf}} will take place instead:<br />
<br />
# ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf<br />
<br />
If you ''do'' have {{ic|/etc/X11/xorg.conf.d/}} configuration files for both, the libinput file must be ordered second; see [[Xorg#Using .conf files]]. If you want to disable libinput (and fallback to older drivers) - just remove the previously created symbolic link from {{ic|/etc/X11/xorg.conf.d/}}.<br />
* If a configuration file seems to have no effect at all, check that it is readable by unprivileged users.}}<br />
<br />
One way to check which devices are managed by libinput is the [[Xorg#General|xorg logfile]]. For example, the following:<br />
<br />
{{hc|$ grep -e "Using input driver 'libinput'" ''/path/to/Xorg.0.log''|<br />
[ 28.799] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.847] (II) Using input driver 'libinput' for 'Video Bus'<br />
[ 28.853] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.860] (II) Using input driver 'libinput' for 'Sleep Button'<br />
[ 28.872] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'<br />
[ 28.878] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'<br />
[ 28.886] (II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'<br />
[ 28.895] (II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'<br />
}}<br />
<br />
is a notebook without any configuration files in {{ic|/etc/X11/xorg.conf.d/}}, i.e. devices are auto-detected.<br />
<br />
Of course you can elect to use an alternative driver for one device and libinput for others. A number of factors may influence which driver to use. For example, in comparison to [[Touchpad Synaptics]] the libinput driver has fewer options to customize touchpad behaviour to one's own taste, but far more programmatic logic to process multitouch events (e.g. palm detection as well). Hence, it makes sense to try the alternative, if you are experiencing problems on your hardware with one driver or the other.<br />
<br />
Custom configuration files should be placed in {{ic|/etc/X11/xorg.conf.d/}} and following a widely used naming schema {{ic|30-touchpad.conf}} is often chosen as filename.<br />
<br />
{{Tip|Have a look at CONFIGURATION DETAILS in {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}} for guidance and refer to the {{man|4|libinput}} manual page for a detailed description of available configuration options.}}<br />
<br />
A basic configuration should have the following structure:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "devname"<br />
Driver "libinput"<br />
...<br />
EndSection<br />
}}<br />
<br />
You may define as many sections as you like in a single configuration file (usually one per input device).<br />
To configure the device of your choice specify a filter by using one of the available filters from {{man|5|xorg.conf|INPUTCLASS_SECTION}}, e.g.<br />
<br />
* {{ic|MatchIsPointer "on"}} (trackpoint)<br />
* {{ic|MatchIsKeyboard "on"}}<br />
* {{ic|MatchIsTouchpad "on"}}<br />
* {{ic|MatchIsTouchscreen "on"}}<br />
<br />
The input device can then be configured with any of the lines of {{man|4|libinput|CONFIGURATION_DETAILS}}. Common options include:<br />
<br />
* {{ic|Option "Tapping" "on"}}: tapping a.k.a. tap-to-click<br />
* {{ic|Option "ClickMethod" "clickfinger"}}: trackpad no longer has middle and right button areas and instead two-finger click is a context click and three-finger click is a middle click, see the [https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html#clickfinger-behavior docs].<br />
* {{ic|Option "NaturalScrolling" "true"}}: natural (reverse) scrolling<br />
* {{ic|Option "ScrollMethod" "edge"}}: edge (vertical) scrolling<br />
<br />
Bear in mind that some of them may only apply to certain devices and you will need to restart X for changes to take effect.<br />
<br />
=== Graphical tools ===<br />
<br />
There are different GUI tools:<br />
<br />
* [[GNOME]]:<br />
** Control center has a basic UI. See [[GNOME#Mouse and touchpad]].<br />
** {{pkg|gnome-tweaks}} offers some additional settings.<br />
* [[Cinnamon]]:<br />
** Similar to the GNOME UI, with more options.<br />
* [[MATE]]:<br />
** Mouse option available in the settings panel. Also accessible using {{ic|mate-mouse-properties}}<br />
* [[KDE Plasma]] 5:<br />
** Keyboard, mouse and controller devices can be configured from System Settings.<br />
* [[Xfce]]:<br />
** Configured from the Mouse and Touchpad submenu in {{pkg|xfce4-settings}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Tapping button re-mapping ===<br />
<br />
Swapping two- and three-finger tap for a touchpad is a straight forward example. Instead of the default three-finger tap for pasting you can configure two-finger tap pasting by setting the {{ic|TappingButtonMap}} option in your [[Xorg]] configuration file. To set 1/2/3-finger taps to left/right/middle set {{ic|TappingButtonMap}} to {{ic|lrm}}, for left/middle/right set it to {{ic|lmr}}.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "touchpad"<br />
Driver "libinput"<br />
MatchIsTouchpad "on"<br />
Option "Tapping" "on"<br />
Option "TappingButtonMap" "lmr"<br />
EndSection}}<br />
<br />
Remember to remove {{ic|MatchIsTouchpad "on"}} if your device is not a touchpad and adjust the {{ic|Identifier}} accordingly.<br />
<br />
=== Manual button re-mapping ===<br />
<br />
For some devices it is desirable to change the button mapping. A common example is the use of a thumb button instead of the middle button (used in X11 for pasting) on mice where the middle button is part of the mouse wheel. You can query the current button mapping via:<br />
<br />
$ xinput get-button-map ''device''<br />
<br />
where ''device'' is either the device name or the device ID, as returned by {{ic|xinput list}}. You can freely permutate the button numbers and write them back. Example:<br />
<br />
$ xinput set-button-map ''device'' 1 6 3 4 5 0 7<br />
<br />
In this example, we mapped button 6 to be the middle button and disabled the original middle button by assigning it to button 0. <br />
For more information, please read about "ButtonMapping" section in {{man|4|libinput}}.<br />
This may also be used for [[Wayland]], but be aware both the ''device'' number and its button-map will be different. Hence, settings are not directly interchangeable. <br />
<br />
{{Tip|You can use ''xev'' (from the {{Pkg|xorg-xev}} package) to find out which physical button is currently mapped to which ID.}}<br />
<br />
{{Style|The rest of this section is overly complicated with parameters for different devices. Unique ideas should be split into subsections to make it more readable.}}<br />
<br />
Some devices occur several times under the same device name, with a different amount of buttons exposed. The following is an example for reliably changing the button mapping for a Logitech Revolution MX mouse via [[xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<nowiki><br />
...<br />
for i in $(xinput list | grep "Logitech USB Receiver" | perl -n -e'/id=(\d+)/ && print "$1\n"')<br />
do if xinput get-button-map "$i" 2>/dev/null| grep -q 20; then<br />
xinput set-button-map "$i" 1 17 3 4 5 8 7 6 9 10 11 12 13 14 15 16 2 18 19 20<br />
fi<br />
done<br />
...<br />
</nowiki>}}<br />
<br />
You could also use the Xorg configure file to do that. The trackball used in this example has a physical scroll wheel, for those devices without that may need to refer the configure for [[Logitech_Marble_Mouse#Configuration_file|Logitech Marble Mouse]].<br />
The physical buttons in Kensington Slimblade Trackball layout are:<br />
{{bc|<nowiki><br />
-----------<br />
|2(M)|8(S)|<br />
-----------<br />
|1(L)|3(R)|<br />
-----------<br />
</nowiki>}}<br />
So for the left hand user, you may use the configure below, although you do not have neither a scroll up button nor scroll down button, you cannot disable them in configure or some application will not response to the action of the wheel.<br />
{{bc|<nowiki><br />
-----------<br />
|2(N)|8(M)|<br />
-----------<br />
|1(R)|3(L)|<br />
-----------<br />
</nowiki>}}<br />
{{hc|/etc/X11/xorg.conf|<nowiki><br />
Section "InputClass"<br />
Identifier "Trackball"<br />
MatchProduct "Kensington Kensington Slimblade Trackball"<br />
MatchProduct "Trackball"<br />
Driver "libinput"<br />
Option "ButtonMapping" "3 0 1 4 5 6 7 8 2"<br />
EndSection<br />
</nowiki>}}<br />
<br />
=== Change touchpad sensitivity ===<br />
<br />
The method of finding the correct thresholds for when libinput registers a touch as DOWN and back UP again can be found [https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#touchpad-pressure-hwdb] in the upstream documentation.<br />
<br />
Custom touchpad pressure values can be set via temporary local device quirks. See [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].<br />
<br />
{{Note|Quirks are an internal API and are not guaranteed to work in future libinput versions. Between versions 1.11 and 1.12, udev rules [https://wayland.freedesktop.org/libinput/doc/1.11.3/udev_config.html#hwdb] were replaced by {{ic|.quirk}} files [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].}}<br />
<br />
=== Disable touchpad ===<br />
<br />
To disable the touchpad, first get its name with {{ic|xinput list}} and then disable it with {{ic|xinput disable ''name''}}.<br />
<br />
{{Note|<br />
* It is more robust to disable it by name than by ID number. The devices may be renumbered.<br />
* It will be necessary to quote the name if it contains spaces.<br />
}}<br />
<br />
To make it permanent, see [[Autostarting]].<br />
<br />
To toggle, write a script such as [https://github.com/lahwaacz/Scripts/blob/master/toggle-touchpad.sh].<br />
<br />
=== Gestures ===<br />
<br />
While the libinput driver already contains logic to process advanced multitouch events like swipe and pinch [https://wayland.freedesktop.org/libinput/doc/latest/gestures.html gestures], the [[Desktop environment]] or [[Window manager]] might not have implemented actions for all of them yet.<br />
<br />
==== libinput-gestures ====<br />
<br />
For [[w:Extended_Window_Manager_Hints|EWMH]] (see also [https://www.freedesktop.org/wiki/Specifications/wm-spec/ wm-spec]) compliant window managers, the [https://github.com/bulletmark/libinput-gestures libinput-gestures] utility can be used meanwhile. The program reads libinput gestures (through {{ic|libinput debug-events}}) from the touchpad and maps them to gestures according to a configuration file. Hence, it offers some flexibility within the boundaries of libinput's built-in recognition.<br />
<br />
To use it, install the {{Aur|libinput-gestures}} package. You can use the default system-wide configured swipe and pinch gestures or define your own in a personal configuration file, see the [https://github.com/bulletmark/libinput-gestures/blob/master/README.md README] for details.<br />
<br />
If using [[touchegg]], uninstall the {{Aur|libinput-gestures}} package to prevent conflicts (see [https://github.com/JoseExposito/gnome-shell-extension-x11gestures/issues/41]).<br />
<br />
==== fusuma ====<br />
<br />
[https://github.com/iberianpig/fusuma Fusuma] is a multitouch gesture recognizer, written in [[Ruby]], which can be used as an alternative to libinput-gestures.<br />
<br />
Install the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]]:<br />
<br />
$ gem install fusuma<br />
<br />
Alternatively, there is also {{AUR|ruby-fusuma}}.<br />
<br />
Other than the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]] gem you have to install the {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] or one between the {{pkg|xdotool}} (for X) and {{AUR|ydotool}} (for Wayland). Other alternatives are listed [https://github.com/iberianpig/fusuma#alternatives-to-xdotool here].<br />
<br />
{{Tip|The {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] supports both X and Wayland}}<br />
<br />
Then in {{ic|~/.config/fusuma/config.yml}} you have to set something like:<br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
sendkey: 'LEFTALT+RIGHT'<br />
right: <br />
sendkey: 'LEFTALT+LEFT'<br />
up: <br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
down: <br />
sendkey: 'LEFTALT+TAB'<br />
pinch:<br />
in:<br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
out:<br />
sendkey: 'LEFTALT+TAB'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Or for {{ic|xdotool}}: <br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
command: 'xdotool key alt+Right'<br />
right: <br />
command: 'xdotool key alt+Left'<br />
up: <br />
command: 'xdotool key ctrl+shift+plus'<br />
down: <br />
command: 'xdotool key ctrl+minus'<br />
pinch:<br />
in:<br />
command: 'xdotool key ctrl+shift+plus'<br />
out:<br />
command: 'xdotool key ctrl+minus'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Same thing for {{ic|ydotool}}.<br />
<br />
The swipe threshold is important for not swiping back too many pages. <br />
<br />
Notice that the configure is for three fingers swipe. Two fingers swipe is not supported [https://github.com/iberianpig/fusuma/issues/104#issuecomment-434742767].<br />
<br />
==== Gebaar ====<br />
<br />
[https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar] is another gesture recognizer.<br />
Unlike Fusuma, it does not support pinching (support is planned in the future though) and thresholds, but in addition to swiping left, right, up and down with 3/4 fingers, it also supports diagonal swipes, which Fusuma does not.<br />
<br />
There is a fork of gebaar at [https://github.com/Osleg/gebaar-libinput Gebaar] which could be installed through {{AUR|gebaar-libinput-git}} which supports pinch gestures and adds additional features to original gebaar. Take in mind that this version is currently under active development and introduces configuration changes which makes it incompatable to original [https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar]<br />
<br />
==== GnomeExtendedGestures ====<br />
<br />
For deeper integration with GNOME, there is [https://github.com/mpiannucci/GnomeExtendedGestures GnomeExtendedGestures] ({{Aur|gnome-shell-extension-extended-gestures-git}}). Three finger horizontal and vertical gestures can be configured to perform gnome-shell actions (such as toggling the application overview or cycling between them).<br />
<br />
=== Scroll with mouse by holding a button ===<br />
<br />
There is a nice trick to optimize scrolling with a mouse or trackball by holding a mouse button (like right or middle button, or some other if the mouse has more buttons) and moving the mouse. Very useful in case your mouse does not have the mouse wheel (often the case with the trackballs). To do that one has to set {{ic|ScrollMethod}} to {{ic|button}} and specify the mouse button in the {{ic|ScrollButton}} option for the action. Here is an example for configuration to achieve that:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/00-mouse.conf|<br />
Section "InputClass"<br />
Identifier "system-mouse"<br />
MatchIsPointer "on"<br />
Option "ScrollMethod" "button"<br />
Option "ScrollButton" "3"<br />
EndSection<br />
}}<br />
<br />
=== Mouse wheel scrolling speed scaling ===<br />
<br />
For some mouses, especially when using on a [[HiDPI]] desktop, the wheel scrolls too slow. A [https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/12 patch] is submitted to libinput but it has not been accepted. There is a third-party [https://github.com/archlinuxcn/repo/tree/d0eb728b38450b47a4913539193a58fb523cc255/archlinuxcn/xf86-input-libinput-oldherl xf86-input-libinput] that incoperates this patch.<br />
<br />
This patch introduces a new property {{ic|libinput Scroll Distance Scale}} to mouses, and you can set a scaling factor like<br />
<br />
$ xinput --set-prop 'RAPOO Rapoo 2.4G Wireless Device' 'libinput Scroll Distance Scale' 2.5 2.5<br />
<br />
where the {{ic|RAPOO Rapoo 2.4G Wireless Device}} is the name of your mouse device, listed in {{ic|xinput --list}}. {{ic|2.5 2.5}} are the scaling factors, for x- and y-axis, respectively.<br />
<br />
Alternatively, install {{Aur|libinput-multiplier}} and restart [[Xorg]], then enlarge y-axis scroll distance to 6 times by<br />
<br />
$ echo 6 > /tmp/libinput_discrete_deltay_multiplier<br />
<br />
Here is an [https://github.com/tkkcc/libinput_patch#change-with-focused-window example] to modify the scaling factor upon focusing change<br />
<br />
== Troubleshooting ==<br />
<br />
First, see whether executing {{ic|libinput debug-events}} can support you in debugging the problem, see {{man|1|libinput-debug-events}} for options.<br />
<br />
Some inputs require kernel support. The tool ''evemu-describe'' from the {{Pkg|evemu}} package can be used to check: <br />
<br />
Compare the output of [http://ix.io/m6b software supported input trackpad driver] with [https://github.com/whot/evemu-devices/blob/master/touchpads/SynPS2%20Synaptics%20TouchPad-with-scrollbuttons.events a supported trackpad]. i.e. a couple of ABS_ axes, a couple of ABS_MT axes and no REL_X/Y axis. For a clickpad the {{ic|INPUT_PROP_BUTTONPAD}} property should also be set, if it is supported.<br />
<br />
=== Touchpad not working in GNOME ===<br />
<br />
Ensure the touchpad events are being sent to the GNOME desktop by running the following command:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled<br />
<br />
Additionally, GNOME may override certain behaviors, like turning off Tapping and forcing Natural Scrolling. In this case the settings must be adapted using GNOMEs {{ic|gsettings}} command line tool or a graphical frontend of your choice. For example if you wish to enable ''Tapping'' and disable ''Natural Scrolling'' for your user, adjust the touchpad key-values like the following:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false<br />
<br />
=== Inertial scrolling does not work in KDE ===<br />
<br />
The feature is currently not implemented, see [https://bugs.kde.org/show_bug.cgi?id=456383 KDE bug 456383]. As a workaround for Chromium-based browsers, install the [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] extension.<br />
<br />
== See also ==<br />
<br />
* [https://wayland.freedesktop.org/libinput/doc/latest/index.html libinput Wayland documentation]<br />
* [https://archive.fosdem.org/2015/schedule/event/libinput/attachments/slides/591/export/events/attachments/libinput/slides/591/libinput_xorg.pdf FOSDEM 2015 - libinput] - Hans de Goede on goals and plans of the project<br />
* [https://who-t.blogspot.com.au/ Peter Hutterer's Blog] - numerous posts on libinput from one of the project's hackers<br />
* [https://www.youtube.com/watch?v=HllUoT_WE7Y Talk by the primary libinput maintainer] outlining the history and state (as of 2020) of Linux input device handling<br />
* [https://who-t.blogspot.com/2018/07/why-its-not-good-idea-to-handle-evdev.html Blog post by the libinput maintainer] outlining the rationale for libinput</div>Cqz