17

I asked this a year ago, with the new (awful) upgrade 18.04 upgrade, the fix got removed and reapplying it doesn't work.

I have a laptop, and while typing, my palm touches the touchpad, which makes the mouse move, close tabs by itself, delete words, open programs, and all other actions.

I want to disable it while typing, same way Windows automatically does it.

This is the previous question, the accepted answer worked for me in 16.04, but no longer works anymore. How do I disable the touchpad while typing?

Note that running the command mentioned in the accepted answer gives this:

Input:

sudo apt install xserver-xorg-input-libinput

Output:

xserver-xorg-input-libinput is already the newest version (0.27.1-1).
The following packages were automatically installed and are no longer required:
  libgnome-keyring-common libgnome-keyring0 libnih-dbus1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Yes, I restarted my laptop.

MichaelX
  • 706

8 Answers8

16

I did it this way:

sudo apt remove xserver-xorg-input-synaptics
sudo apt install xserver-xorg-input-libinput
sudo reboot

On my machine I had both of them, so synaptics was default, deleting it helped me. Do not forget to reboot.

Vadym K
  • 318
  • 2
    This worked for me (Lenovo X1 Carbon running Ubuntu 18.04 LTS). – ilmarinen Jan 18 '20 at 11:03
  • 2
    I ran into this in 19.10 after installing gnome, kubuntu, and a handful of other desktop environments I was experimenting with. Worked prior and didn't work again until I did the above. – mlissner Jan 23 '20 at 07:50
  • 1
    Works for me as well (Latitude 7390). Been playing around with different desktop environments lately. – Degraw Jan 27 '20 at 14:29
  • It worked for me. Some nuissance: first time I rebooted I could not see the box for typing the password, although typing it and hitting enter worked, and next time I rebooted everything was fine. – Lucas Mar 30 '20 at 17:48
  • Although this worked for me, it also removed the "tap to click" option and behaviour, which is a no-no for me. So I installed back xserver-xorg-input-synaptics (w/o removing libinput), which again removed the option to disable touchpad while typing. So back to the drawing board. – Lucas Apr 02 '20 at 08:58
  • 1
    @Lucas you can have "Tab on click" with libinput. Just go to "Mouse & Touchpad" settings. – Vadym K Apr 03 '20 at 10:17
  • @VadimK Thak you! that worked. – Lucas Apr 04 '20 at 11:13
  • I remember when I tried xubuntu-desktop and i need to install xserver-xorg-input-synaptics. Then I uninstalled the xubuntu-desktop and now I have two drivers - libinput and synaptics. When I removed the synaptics it worked again. Thank you @VadimK – Player1 May 15 '20 at 17:13
  • I tried this, but found the libinput tracking unusable. So I just kept Synaptics and disabled Tap to Click. – Michael Gummelt Jul 18 '20 at 18:29
  • 1
    Just to disable small thing, we have to change the software, hmm – zihadrizkyef Jan 26 '21 at 14:20
  • This works. Phew!.. Ubuntu 21.10 – Olubodun Agbalaya Dec 17 '21 at 03:34
5

Install gnome-tweaks

sudo apt install gnome-tweaks

and open it.

Under the tab Keyboard & Mouse you will find in the main window under Touchpad the switch Disable While Typing.

enter image description here

abu_bua
  • 10,783
4

Assuming your system is using libinput, not synaptics, here is the correction. Copy the following place in /etc/X11/xorg.conf.d/90-libinput.conf. Must log out to trigger a re-load of X11.

The change that affects the touchpad while typing is in the second to last line. In my case, I have some boiler plate that channels all of the action to the libinput driver, that may not be strictly necessary. HOwever, I'm certain that the last stanza is your magic bullet.

# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

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

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "MyTouchpad"
        MatchIsTouchpad "on"
        Driver "libinput"
        Option "Tapping" "on"
        Option "DisableWhileTyping" "on"
EndSection
pauljohn32
  • 3,743
  • Thanks, this was the only solution that worked with my Alienware m15 r2 – manuel saraiva Apr 27 '20 at 16:20
  • I did a fresh install of Ubuntu 20.04 on a brand new laptop and learned that some desktops have this as a setting/correction. It appears Gnome desktop has a fix for tapping and disable while typing. However, I installed my favorite XFCE4 and it does not have a built-in fix and the X11 config change was still necessary. – pauljohn32 Apr 28 '20 at 20:48
  • 1
    This worked on my Xubuntu 20.04 and thankfully without installing any other software. I just had to create the /etc/X11/xorg.conf.d/ folder. Thanks! – user1252280 May 01 '20 at 15:43
  • Works like a charm on Ubuntu 20.10, thanks so much! – Nicholas Stommel Jan 18 '21 at 06:23
1

Install Touchpad Indicator GNOME extension. Perfect.

https://extensions.gnome.org/extension/131/touchpad-indicator/

Switch the touchpad, trackpoint, fingertouch, touchscreen or a pen device on and off easily from the top panel. Optionally, automatically disable some or all devices when a mouse is plugged in and re-enable them when unplugged.

heynnema
  • 70,711
1

I tried to many ways that did not work. Finally founded with this link below: https://help.ubuntu.com/community/SynapticsTouchpad

Type: xinput list Find your touchpad ID. For example it is "7"

Type: xinput --watch-props 7

Find "Palm detection" and "Palm Dimension" lines. There will be a number in parentheses near these lines. For example Palm Detection=(400) Palm Dimension=401

Open a new tab or New window

Type: xinput --set-prop 7 "400" 1 Type: xinput --set-prop 7 "401" 1, 100 After change of these settings you must see the changes with the previous tab like Property 'Synaptics Palm Dimensions' changed. For palm dimension you can find best for fits with you.

Erdem KAYA
  • 11
  • 1
1

No extra package required to disable, do below

  1. Go to settings
  2. Devices
  3. Mouse & Touchpad
  4. In Touchpad toggle the button to off, see below picture enter image description here
Ramratan Gupta
  • 159
  • 2
  • 12
0

I found what worked for me on Ubuntu 18.04. It was to reinstall xserver-xorg. I'm not sure about consequences so do it at your own risk MIGHT BREAK SOMETHING

sudo apt-get remove xserver-xorg
sudo apt-get install xserver-xorg
sudo dpkg-reconfigure xserver-xorg
apt-get install ubuntu-desktop  # It apparently deleted this package also

Someone at the same forum advised to remove xserver-xorg and its configs (I didn't need to do this)

sudo apt-get remove --purge xserver-xorg

Also what helped was palm rejection from Erdem KAYA answer. Other methods like gnome-tweaks or touchpad-indicator didn't work for me.

Combinacijus
  • 103
  • 3
0

The following command did wonders for me:

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true
JBSnorro
  • 221