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

6,333

Solution 1

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.

Solution 2

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
Share:
6,333

Related videos on Youtube

kobra
Author by

kobra

Updated on September 18, 2022

Comments

  • kobra
    kobra over 1 year

    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!

    • kobra
      kobra almost 6 years
      Am I the only one with this problem? :(
    • Hwende
      Hwende about 5 years
      This link displays a list where xorg.conf files could be in, I would check these and make sure you don't have another libinput conf file in one of those places. manpages.ubuntu.com/manpages/cosmic/man5/xorg.conf.5.html
  • kobra
    kobra almost 6 years
    Woah. Magic. This fixed the problem. Thank you very much!
  • DMack
    DMack almost 6 years
    My system is a desktop with one USB mouse and no touchpad, but it's still trying to tap-and-drag things. Does anyone know how I can disable it without any Snaptics/Touchpad devices in xinput?
  • kobra
    kobra over 5 years
    @DMack I didn't have anything saying "Synaptics" either, the name of my touchpad was just a serial number, so I suppose it does not matter.
  • Steven Lu
    Steven Lu about 4 years
    This works way better for me on 18.04 on this dell laptop than the other option. It both works immediately and persists across reboots.
  • GTF
    GTF almost 4 years
    This worked for me where the xinput version didn't make a difference. I'm on PopOS 20.04 though.
  • Boris B.
    Boris B. almost 4 years
    Cannot thank you enough for this, accidental drags due to my dry fingers were driving me insane.
  • Edgar Quintero
    Edgar Quintero over 2 years
    For me it was list-props 14
  • Admin
    Admin almost 2 years
    This isn't working for me on GNOME 42 - the setting has no effect.
  • Admin
    Admin almost 2 years
    My bad - I was changing "tap-and-drag-lock" instead of "tap-and-drag".