:: Re: [DNG] Disabling touchpad [was S…
Página Inicial
Delete this message
Reply to this message
Autor: aitor
Data:  
Para: dng
Assunto: Re: [DNG] Disabling touchpad [was So what desktop...]
Hi,

On 25/9/24 11:42, Didier Kryn wrote:

>     Some people expressed the concern that they don't use their
> touchpad but unvountarily touch it and get the cursor moved in the wild.
>     I think this problem has a simple solution:
>     1) find the device-driver module of the touchpad -- with the hope
> it is not the same as the keyboard proper;
>     2) blacklist it;
>     3) reboot.
>     I'm too lazy to search for the commands to do that and to
> experiment it myself, since I'm not concerned. Therefore find the exact
> recipe by yourself (~:


This other method worked for me:

#!/bin/sh

list=$(udevadm info -e | grep -i -A 15 ID_INPUT_TOUCHPAD | grep -i "^E: DEVPATH" | cut -d'=' -f 2)
for item in $list; do
    subsystem=$(udevadm info -q all -p $item | grep -i "^E: SUBSYSTEM" | cut -d'=' -f 2)
    if [ $subsystem = "input" ] && [ -f "/sys/$item/device/inhibited" ]; then
       echo $1 > /sys/$item/device/inhibited
    fi
done
:



Now you can pass (0|1) as an argument in the command line:

# ./script 1 (disable)
# ./script 0 (enable)

Cheers,

Aitor.