Keyboard shortcut for running the scriptĪnd last step is adding keyboard shortcut to run the script file. State=`xinput list-props '$device' | grep 'Device Enabled' | grep -o '$'` So I got a bash script file for toggling touchpad with 'xinput' command(original script can be found here). Getting id of your touchpad $ xinput listĢ. Here is a solution for toggling touchpad just by pressing a shortcut. In my case, fn+ F9 is mapped into Touchpad toggle.īut the key does nothing just showing touch pad icon on the right-top of the screen like this. Now if I could just get the up-arrow in nautilius to work and see the. bashrc or whatever except that I'm not sure that device 12 (actually 11 for me) is always the touchpad. xinput set-prop 12 'Device Enabled' 0Īnd I would put it in. Since 12 is the id for my touchpad, running the following command will disable it.
It displays all the input devices connected. This worked for me in 11.10 : ⎡ Virtual core pointer id=2 In Ubuntu versions >12.04 you can also directly disable via xinput -disable 12
You will get an output that looks like this: ⎡ Virtual core pointer id=2 Run the following command in a terminal: xinput list