disable touchpad

Johannes Lips johannes.lips at gmail.com
Fri Mar 27 08:29:43 CET 2020


On 27/03/2020 07:42, Randy Dunlap wrote:
> Hi,
> 
> I want to disable the touchpad on my laptop.
> The laptop is a Toshiba Portege and the toshiba_acpi driver
> recognizes the laptop and reports that it has the following
> capabilities:
> 
> [   24.392059] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.24
> [   24.472292] toshiba_acpi: Supported laptop features: hotkeys video-out fan touchpad accelerometer-axes usb-sleep-charge panel-power-on cooling-method
> 
> 
> When I press Fn + F9 (touchpad on/off toggle), the keycode
> is recognized AFAICT.  evtest reports:
> 
> Event: time 1584932366.360765, -------------- SYN_REPORT ------------
> Event: time 1584932366.600689, type 4 (EV_MSC), code 4 (MSC_SCAN), value 143
> Event: time 1584932366.600689, type 1 (EV_KEY), code 530 (KEY_TOUCHPAD_TOGGLE), value 1
> 
> 
> Is there a way to configure xfce4 to recognize that keycode
> and disable/enable the touchpad?
Hi Randy,

I am using the following small script in connection with Xfconf to 
disable or enable the touchpad and trackstick depending if there's an 
external mouse.
It works really nice, when run at startup and I also put it into 
/usr/local/bin so that whenever I need to enable/disable it on the move 
I just call that command and am good to go.

Hope this helps
Johannes

> 
> or do I have to handle this at the Xorg level?
> 
> thanks.
> 

-------------- next part --------------
#!/bin/sh

# disable touchpad when mouse is connected during startup

if [ `ls /dev/input | grep -c mouse` -gt 2 ]; then
echo "1"
        xfconf-query -c pointers  -p /AlpsPS2_ALPS_DualPoint_TouchPad/Properties/Device_Enabled -s 0
	xfconf-query -c pointers  -p /AlpsPS2_ALPS_DualPoint_Stick/Properties/Device_Enabled -s 0
fi
if [ `ls /dev/input | grep -c mouse` -eq 2 ]; then
        echo "2"
  	xfconf-query -c pointers  -p /AlpsPS2_ALPS_DualPoint_TouchPad/Properties/Device_Enabled -s 1
	xfconf-query -c pointers  -p /AlpsPS2_ALPS_DualPoint_Stick/Properties/Device_Enabled -s 1
  fi


More information about the Xfce mailing list