11

How I can "disable/enable" my laptop's touchpad on Elementary OS 0.4 Loki?

2
  • I switched for a couple of days from freya to loki and unhappily your right. In freya it was possible to switch off the touchpad and in the mouse-system-settings of loki it isn't anymore :(
    – user3001
    Commented Sep 14, 2016 at 21:41
  • partially answered here. I have added that answer under here and more on how to use shortcuts
    – user170
    Commented Oct 16, 2016 at 9:05

3 Answers 3

8

Do xinput list to see the name of the touchpad. Let's say it's "SynPS/2 Synaptics TouchPad".

enter image description here

(the number after id= can be used instead of the name of the device, but id may vary between systems and can even be changed after reboot in some cases. Using the name is safer, as the wrong id can disable the keyboard, etc)

The command to disable would then be

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0

Enable:

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1

Change accordingly to YOUR device name.

These two commands can then be associated with shortcuts under Keyboard > Custom > Add

enter image description here

These two commands can also be run through the Applications launcher:

Having Gedit as text editor:

sudo gedit ~/.local/share/applications/disable_touchpad.desktop

With the lines:

[Desktop Entry]
Name=Disable touchpad
Comment=Set your touchpad preferences
Exec= xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
Icon=touchpad-disabled
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;

Also:

sudo gedit ~/.local/share/applications/enable_touchpad.desktop

With the lines:

[Desktop Entry]
Name=Enable touchpad
Comment=Set your mouse and touchpad preferences
Exec= xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1
Icon=input-touchpad-symbolic
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;

Now, just use the Super-Space launcher and type the first letters of 'touchpad', 'enable' or 'disable'.

enter image description here

Once created, those launchers can be accessed in different ways, like added to the dock etc.

10
  • 1
    Thanks! A little correction to others Icon=touchpad-disabled must be Icon=touchpad-disabled-symbolic.
    – efkan
    Commented Nov 25, 2016 at 11:44
  • 1
    Also my mouse ID changes at every restart. I've handled by using Exec= xinput set-prop "my device name" "Device Enabled" 0.
    – efkan
    Commented Nov 25, 2016 at 12:36
  • @efkan - Concerning icons: both work for me. I can confirm I have the line Icon=touchpad-disabled in /usr/share/applications/disable_touchpad.desktop
    – user170
    Commented Nov 25, 2016 at 13:02
  • 1
    You should put "SynPS/2 Synaptics TouchPad" instead of ID (should be included double quotes). Your solution is really useful for me.
    – efkan
    Commented Nov 25, 2016 at 13:14
  • 1
    For those using Apple hardware, don't use "Apple Inc. Apple Internal Keyboard / Trackpad" as the device name. That will only disable the keyboard, not the Trackpad. Have yet to find the name of the actual Trackpad Commented Jul 15, 2017 at 5:06
0

If your keybinding is not working you can try typing in terminal "synclient TouchPadOff=1" command in order to disable touchpad if you want to enable it back you can type "synclient TouchpadOff=0"

6
  • synclient TouchPadOff=1 gives me this: Couldn't find synaptics properties. No synaptics driver loaded? and has no other effect.
    – user170
    Commented Nov 25, 2016 at 13:07
  • 1
    Okay then can you first type in terminal "xinput list" then seek for your touchpad id then type in "xinput set-prop #id "Device Enabled" 0" replace #id with the id of your touchpad
    – bokherif
    Commented Nov 25, 2016 at 13:09
  • I am the OP of the answer that already says that.
    – user170
    Commented Nov 25, 2016 at 13:14
  • @cipricus sorry I didnt check that the case I have told first was for the case where you use synaptics package sorry if I couldnt help
    – bokherif
    Commented Nov 25, 2016 at 13:15
  • Don't worry. - I have made a change to my answer (according to a new comment) that is independent of the variable number of the device id and uses instead the name of the device. - You mean your solution works on machines that do not use synaptics? What does it show for you under xinput list? (just curious)
    – user170
    Commented Nov 25, 2016 at 13:30
-1

This is how I do in my elementary os (0.3 Freya). Hope this will help, since 0.4 Freya is based on Ubuntu 16.04

Go to all settings -> Mouse & Touchpad -> Touchpad

And turn off touchpad

4
  • Thanks but There is not an option the "turn off touchpad" in the Mouse & Touchpad settings.
    – mkuru
    Commented Aug 4, 2016 at 15:36
  • it's not an option, it's a button, simply turn it off Commented Aug 5, 2016 at 4:05
  • 1
    Thanks again but there is not a button, an option or a choice the "turn off touchpad" in the Mouse & Touchpad settings.
    – mkuru
    Commented Aug 5, 2016 at 6:53
  • In Loki that button seems absent
    – user170
    Commented Oct 16, 2016 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.