linux触摸板开关――by xzh

[root@XiaoZH input]# yum install xorg-x11-apps


---------------------------------------------

[root@XiaoZH input]# cd /dev/input

[root@XiaoZH input]# ls

by-id    event1   event12  event3  event6  event9  mouse1

by-path  event10  event13  event4  event7  mice    mouse2

event0   event11  event2   event5  event8  mouse0


看到很多个设备


[root@XiaoZH input]# cat mouse0

[root@XiaoZH input]# cat mouse1

(一些看不懂的字符)


[root@XiaoZH input]# cat mouse2


有三个mouse  用cat mouse 当碰触触摸板时出现乱码就证明这个时触摸板 如我这个是mouse1

确定触摸板名字后



[root@XiaoZH input]# cd /proc/bus/input/

[root@XiaoZH input]# cat devices

I: Bus=0019 Vendor=0000 Product=0005 Version=0000

N: Name="Lid Switch"

P: Phys=PNP0C0D/button/input0

S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0

U: Uniq=

H: Handlers=event0

B: EV=21

B: SW=1


I: Bus=0011 Vendor=0002 Product=0001 Version=0063

N: Name="PS/2 Logitech Wheel Mouse"

P: Phys=isa0060/serio4/input0

S: Sysfs=/devices/platform/i8042/serio4/input/input5

U: Uniq=

H: Handlers=mouse1 event5

B: EV=7

B: KEY=70000 0 0 0 0

B: REL=103


这里看到mouse1对应的是 PS/2 Logitech Wheel Mouse


[root@XiaoZH input]# xinput list

? Virtual core pointer                        id=2    [master pointer  (3)]

?   ? Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]

?   ? A4TECH USB Device                           id=7    [slave  pointer  (2)]

?   ? Macintosh mouse button emulation            id=15    [slave  pointer  (2)]

?   ? A4TECH USB Device                           id=16    [slave  pointer  (2)]

?   ? PS/2 Logitech Wheel Mouse                   id=14    [slave  pointer  (2)]




查看触摸板状态



[root@XiaoZH input]# xinput --list-props "PS/2 Logitech Wheel Mouse"

Device 'PS/2 Logitech Wheel Mouse':

   Device Enabled (131):    0

   Coordinate Transformation Matrix (133):    1.000000, 0.000000,

开启触摸板:

[root@XiaoZH input]# xinput --set-int-prop "PS/2 Logitech Wheel Mouse" "Device Enabled" 8 1


关闭触摸板:

[root@XiaoZH input]# xinput --set-int-prop "PS/2 Logitech Wheel Mouse" "Device Enabled" 8 0


你可能感兴趣的:(linux,触摸,开关)