It is a record until the function is added to the three-finger swipe using Ubuntu 19.10. What we have achieved is as follows.
--Changed the driver used on the Logitech T650 trackpad --Adjusted the scroll amount of two-finger scroll --Assigned the desktop move function to the three-finger swipe
I'm using Ubuntu 19.10. There are three drivers for using Trackpad on Linux:
To find out which one is being used now, use the xinput
command.
You can find the name of the device recognized by xinput list
and display it byxinput list-prop <device name or id>
.
$xinput list
⎡Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Rechargeable Touchpad T650 id=12 [slave pointer (2)]
$xinput list-props 'Logitech Rechargeable Touchpad T650'
Device 'Logitech Rechargeable Touchpad T650':
Device Enabled (154): 1
Coordinate Transformation Matrix (156): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (286): 0
Device Accel Constant Deceleration (287): 1.000000
Device Accel Adaptive Deceleration (288): 1.000000
Device Accel Velocity Scaling (289): 25.000000
Trackpad Disable Input (290): 0
Trackpad Sensitivity (291): 1.000000
In the case of Synaptic and libinput, it can be identified because there is a setting name of the module name. In the case of mtrack, it is displayed as Trackpad
.
To enable a particular driver, the initial settings are stored in /usr/share/X11/xorg.conf.d/
after the driver is installed, so this is/etc/X11/xorg.conf. Copy to d /
.
$ls /usr/share/X11/xorg.conf.d/
10-amdgpu.conf 10-quirks.conf 40-libinput.conf 51-synaptics-quirks.conf 70-wacom.conf
10-nvidia.conf 10-radeon.conf 50-mtrack.conf 70-synaptics.conf
$cp /usr/share/X11/xorg.conf.d/50-mtrack.conf /etc/X11/xorg.conf.d/
$ls /etc/X11/xorg.conf.d/
50-mtrack.conf
Now, when you log in and log out, the desired driver will be enabled.
To change the driver settings, rewrite the ʻOption item in
/etc/X11/xorg.conf.d/or use
xinput set-props
However, the conf file and the setting name in xinput list-props do not match. It is a setting name with almost the same name, but since there is no correspondence table, it seems that there is no choice but to choose something like that.
Currently Xorg scrolling works as button 5 and button 6. Therefore, scrolling seems to be realized by how many times button 5 and button 6 are pressed for each movement amount.
Inertial scrolling is possible in Synaptics, It seems that it is realized by adjusting the frequency of pressing the scroll button.
libinput tells you how much you've moved, I don't have a specification to adjust the scroll amount to protect that specification. Currently, GNOME3 does not seem to handle scrolling amount either.
Synaptics
Synaptics is already in maintenance mode and there are no plans to update its features in the future. However, it only supports inertial scrolling and feels very easy to use for those who are familiar with macOS. However, the three-finger Swipe does not work.
https://wiki.archlinux.jp/index.php/Synaptics_%E3%82%BF%E3%83%83%E3%83%81%E3%83%91%E3%83%83%E3%83%89
You can check the list of setting items from man.
https://linux.die.net/man/4/synaptics
When I tried to operate it, it felt like it was moving, and the inertial scroll was comfortable, but I didn't feel it was free to use.
mtrack
mtrack also has three-finger swipe and four-finger swipe as a function. Two-finger scrolling also works quickly. However, it seems that it is not currently maintained. All the setting items are written in the README of this github.
https://github.com/BlueDragonX/xf86-input-mtrack
The scroll amount and movement speed can also be adjusted, so it is old but very effective.
libinput
It is a library that is still under development. I think it's better to use this if possible.
https://wayland.freedesktop.org/libinput/doc/latest/index.html
The setting items are described below.
https://www.mankier.com/4/libinput
Three-finger swipes are not supported, but can be used by installing libinput-gestures. For the reason in the previous section, the amount of movement when scrolling cannot be set.
If libinput + libinput-gestures is enough, that's fine. With libinput, if you want to tune the amount of scrolling, you can use mtrack.
The author is using mtrack as of December 2019. The following is the configuration file used.
Section "InputClass"
MatchIsTouchpad "true"
Identifier "Multitouch Touchpad"
Driver "mtrack"
Option "ScrollDistance" "30"
Option "ScrollUpButton" "5"
Option "ScrollDownButton" "4"
Option "SwipeDistance" "200"
Option "TapDragEnable" "false"
EndSection
--ScrollDistance 30 Adjustable amount of scrolling with two-finger scrolling --ScrollUp / DownButton 5/4 Change to natural scroll by swapping --SwipeDistance 200 Three-finger swipe sensitivity threshold (initial value 700) --TapDragEnable false Disables the tap-drag feature
I want to move the desktop from the mouse key. To do this, take the following steps:
--Assign mouse buttons to Swipe with mtrack --With xbindkeys, you can execute commands from the mouse button. --Send keyboard keys (Super + M, etc.) from commands with xdotools --Set the key (Super + M) as a keyboard shortcut for moving the desktop
In mtrack, three-finger swipes are assigned to 8-11 buttons.
To execute the xdotools command with xbindkeys, create ~ / .xbindkeysrc like the following.
"xdotool key Super_R+m"
b:8+Release
"xdotool key Super_R+comma"
b:9+Release
"xdotool key Super_R+s"
b:10+Release
To make xbindkeys resident, configure the command xbindkeys_autostart
to be executed.
Finally, in the Gnome keyboard shortcut settings, assign the required functions to Super + M, Super + ,, and Super + s.
Using the Trackpad, I was able to adjust the amount of scrolling and assign functions to three-finger swipes.
Recommended Posts