How to disable the "tap dragging"-feature in Ubuntu 18.04 (libinput) without disabling "tap to click"?

I can't seem to figure out how to disable the "tap dragging"-feature in Ubuntu 18.04's libinput. By disabling "tap dragging" I mean that I want to disable the dragging-functionality when using tap without actually disabling "Tap-to-click". This way when I want to drag something, I'd have to actually click on the touchpad. While it could be a handy feature for some, I don't really need it and it keeps triggering by accident. If it's any help, I am on Macbook Pro, some late-2013 or early-2014 version.

I've tried to search around for an answer, and checked libinput's manual to figure out the correct configuration. What I found was this:

Option "TappingDrag" "bool"

Enables or disables drag during tapping behavior ("tap-and-drag"). When enabled, a tap followed by a finger held down causes a single button down only, all motions of that finger thus translate into dragging motion. Tap-and-drag requires option Tapping to be enabled.

I tried to set this option in /usr/share/X11/xorg.conf.d/40-libinput.conf:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "TappingDrag" "false"
EndSection

Reboot and tap dragging is still there. I also tried to add the same TappingDrag-option to the Touchscreen- and Tablet-sections in the config file with no luck. What am I doing wrong?

I hope someone knows the answer, this is really bugging me. Thanks in advance!


Solution 1:

GNOME has a setting for this, it is just not accessible in GNOME Control Center.

You can either use terminal or dconf-editor to access this setting.

Terminal:

  1. Turn off tap-and-drag.

    gsettings set org.gnome.desktop.peripherals.touchpad tap-and-drag false
    
  2. Check if it was successful.

    gsettings get org.gnome.desktop.peripherals.touchpad tap-and-drag
    

dconf-editor:

  1. Install dconf-editor
  2. Inside dconf-editor navigate to org/gnome/desktop/peripherals/touchpad
  3. Find tap-and-drag and turn off the setting

Solution 2:

Since 18.04 is using Xorg instead of Wayland, you should be able to set it this way:

First find the device:

% xinput list                                                                   
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=13   [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)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=14   [slave  keyboard (3)]

I'm on a thinkpad. Your devices are likely different.

List the properties of the touchpad:

% xinput list-props 12                                                          
Device 'SynPS/2 Synaptics TouchPad':
    Device Enabled (140):   1
    Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Tapping Enabled (276): 1
    libinput Tapping Enabled Default (277): 0
    libinput Tapping Drag Enabled (278):    1
    ...

Then disable it:

% xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Drag Enabled' 0

The way I set this permanently is by putting into a script that runs on login.

I hope that helps. I don't know how to fix it at the system-level, nor on Wayland.