Quite annoyingly, I was unable to disable touchpad on laptop through the dedicated fn combination. Bit of googling brought results fast, here’s a simple script I use now for switching on and off.
#!/bin/bash
if [ "$1" = "off" ]; then
sudo modprobe -r psmouse
elif [ "$1" = "on" ]; then
sudo modprobe psmouse
else
echo "usage: $0 [on|off]"
fi
Update: you can also use the following “toggle” script, if you want to avoid having to specify on/off each time:
#!/bin/bash
lsmod | grep psmouse &> /dev/null
if [ "$?" = "1" ]; then
modprobe psmouse
else
modprobe -r psmouse
fi
Thanks.
This script changes the value of “Enable mouse clicks with touchpad” when executed. It can be run with a keyboard combination set in gnome-keybinding-properties:
#!/bin/bash
mode=”$(gconftool-2 -g /desktop/gnome/peripherals/touchpad/tap_to_click)”
if [ $mode == "true" ] ;
then
gconftool-2 -s -t bool /desktop/gnome/peripherals/touchpad/tap_to_click false
else
gconftool-2 -s -t bool /desktop/gnome/peripherals/touchpad/tap_to_click true
fi
the toogle script is working , but it requires sudo to be executed , so it won’t be practical to assign it to a shortcut keys.
i don’t want to type my password each time i want to disable the touchpad.
any way thanks for the nice tip
#!/bin/bash
enabled=`xinput –list-props “PS/2 Generic Mouse” | grep -e “Device Enabled\ (126):\s*1″`
if [ -n "$enabled" ]; then
xinput –set-prop “PS/2 Generic Mouse” “Device Enabled” 0
else
xinput –set-prop “PS/2 Generic Mouse” “Device Enabled” 1
fi
———————————————————————————-
that worked for me on Dell N5110