首页 > 代码库 > centos 7 禁用笔记本触摸板设置

centos 7 禁用笔记本触摸板设置

安装 xorg-x11-apps 包: yum install xorg-x11-apps。

终端输入 xinput list

找到 PS/2

记录后面的ID 

xinput list

? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? PixArt USB Optical Mouse id=12 [slave pointer (2)]
? ? FSPPS/2 Sentelic FingerSensingPad id=14 [slave pointer (2)]
? Virtual core keyboard id=3 [master keyboard (2)]
? Virtual core XTEST keyboard id=5 [slave keyboard (3)]
? Power Button id=6 [slave keyboard (3)]
? Video Bus id=7 [slave keyboard (3)]
? Video Bus id=8 [slave keyboard (3)]
? Power Button id=9 [slave keyboard (3)]
? Sleep Button id=10 [slave keyboard (3)]
? USB Webcam id=11 [slave keyboard (3)]
? AT Translated Set 2 keyboard id=13 [slave keyboard (3)]

我这儿是14

 

 

然后:# 屏蔽   xinput set-int-prop 14 "Device Enabled" 8 0# 启用   xinput set-int-prop 14 "Device Enabled" 8 1

简单的脚本

#!/bin/bash#echo "==================================="#echo "============触摸板管理程序============"if [ $1 == ‘on‘ ]then   xinput set-int-prop 14 "Device Enabled" 8 1   echo "触摸板开启成功!"elif [ $1 == ‘off‘ ]then   xinput set-int-prop 14 "Device Enabled" 8 0   echo "触摸板关闭成功!"else   echo "请输入参数:on/off"   echo "比如开启触摸板:FingerSensingPad on"fi

centos 7 禁用笔记本触摸板设置