In some laptop models (e.g. HP Pavilion dv4), the touchpad deactivation toggle button works properly; in others (e.g. HP G60), it seems to have no effect, even in the same version of Linux on a liveCD.
Tentatively, this solution seems to be universal:
xinput(seems to be installed by default) to get a device listing.
xinput list-props "<name of touchpad device>"to verify that "Device Enabled" is set to "1".
xinput set-prop "<name of touchpad device>"to deactivate the touchpad. (Works instantaneously; no reboot required.)
Once you've verified that this works and you know what your device is named, it's simple to create a .sh file to turn off your touchpad and another one to turn it on.
synclient TouchpadOff=1to disable the touchpad (...
- Depending on how old your X server is you may have to add this to xorg.conf:
Section "InputDevice" Identifier "synaptics" Driver "synaptics" Option "SHMConfig" "true" EndSection
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "SHMConfig" "true" EndSection
The X server may need to be restarted (i.e. reboot) after making changes. (The latter block is what worked for me.)
In theory, one can then use xbindkeys to assign a key to toggle activation of the touchpad -- where xbindkeys does apparently see the touchpad's deactivation button as a keystroke. (In practice, this also deactivated clicking from the external mouse. It's also not clear how to set xbindkeys to issue alternate commands so that toggling can be effected. Further experimentation is needed.)