30 Aug

Continuously move dragged content with touch pad

Following operation only takes effect in Xorg. If you are in Wayland, you need to log out and switch to a Xorg session.

First, you need to find out device ID of your touchpad:

$ xinput list

This command will give you something like :
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SYNA7813:00 06CB:16DB id=13 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)]
⎜ ↳ dougav’s mouse id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Clavier de Dawud W Vong id=10 [slave keyboard (3)]
↳ HP Wide Vision HD id=11 [slave keyboard (3)]
↳ Intel Virtual Button driver id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ HP WMI hotkeys id=16 [slave keyboard (3)]
↳ HP Wireless hotkeys id=17 [slave keyboard (3)]

Touchpad’s ID is 15 in this case
You can list Properties of your TOuchpad with:
$ xinput --list-props 15
you’ll see something like:
Device 'ETPS/2 Elantech Touchpad':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (296): 1
libinput Tapping Enabled Default (297): 0
libinput Tapping Drag Enabled (298): 1
libinput Tapping Drag Enabled Default (299): 1
libinput Tapping Drag Lock Enabled (300): 0
libinput Tapping Drag Lock Enabled Default (301): 0
libinput Tapping Button Mapping Enabled (302): 1, 0
libinput Tapping Button Mapping Default (303): 1, 0
libinput Natural Scrolling Enabled (278): 1
libinput Natural Scrolling Enabled Default (279): 0
......

Property “libinput Tapping Drag Lock Enabled” which should be 0 by default is what we need to turn on.
Execute:

$ xinput set-prop 12 "libinput Tapping Drag Lock Enabled" 1
This will enable Drag lock function.
Now you will be able to continuously drag contents without being restricted by touchpad size.
When your dragging movement reaches the edge of the touchpad, you can quickly lift your finger and click-hold the middle of the touchpad without losing your connection with the dragged content.
Please add this command to .xprofile to make it permanently available.

Leave a Reply