Install Jupiter
Instructions for Ubuntu 11.10, 11.04, 10.10, 10.04: http://www.webupd8.org/2011/09/jupiter-applet-finally-available-for.html
sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter
Jupiter comes with a useful script to disable and re-enable the touchpad/track pad, it can be ran using the following command:
sudo /usr/lib/jupiter/scripts/touchpad
Now all you’ll need to do is add this command to a keyboard shortcut, below are instructions for several desktop environments.
In xfce:
Applications > Settings > Settings Manager
Click Keyboard
Click on the “Applications Shortcuts” tab.
Click Add:
Here you will be promped with a new window asking for the command you wish to run, enter the following:
sudo /usr/lib/jupiter/scripts/touchpad
Click OK and it will now ask for a keyboard shortcut. Simply press the key combination you want to assign to disabling the touchpad (for example, I used Alt+F1) the keys you’re pressing will show up and the window will close.
You’ll now see the command and shortcut in the list and you can now press that key combo to disable the trackpad and press it again to re-enable it.
In Gnome:
In Unity:
bish bash bosh.
5 replies on “Toggle Touchpad With Keyboard Shortcut in Ubuntu”
Thanks! Saved my day.
[…] I am trying to write a script that will disable the touchpad when a USB mouse is connected. I am using ‘jupiter’ to disable the touchpad. (http://alexsleat.co.uk/2012/03/22/toggle-touchpad-with-keyboard-shortcut-in-ubuntu/) […]
Thanks for the post. Jupiter works fine on ubuntu 12.04.
The fact that it needs superuser permissions is kind of inconvenient. In gnome you have to bind
"gksudo /usr/lib/jupiter/scripts/touchpad"
in order to see the password prompt
Thank you!!!!
Just why root access is needed?!
xinput –list
xinput –set-prop –format=8 “${touchpadName}” “Device Enabled” 1
And no any escalation and root passwords.