centos6.4禁用笔记本触摸板设置

安装 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)]
⎜   ↳ PS/2 Generic Mouse                      	id=7	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=8	[slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation        	id=14	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=15	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=6	[slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_HD             	id=9	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=10	[slave  keyboard (3)]
    ↳ Lid Switch                              	id=11	[slave  keyboard (3)]
    ↳ Power Button                            	id=12	[slave  keyboard (3)]
    ↳ Power Button                            	id=13	[slave  keyboard (3)]

我这儿是7

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

简单的脚本

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

暂无评论

写评论