Linux下禁用触摸板

1 概述

在Linux下禁用触摸板的方法,xinput关闭

xinput命令是用来配置和测试X输入设备的工具,包括但不限于键盘,鼠标等,在这里用作关闭触摸板,基于同样的道理可以关闭键盘等。

首先使用:

xinput list 查看设备列表:

xieaoyanh@xieaoyanh-pc:/media/xieaoyanh/DATA/home$ xinput

⎡ Virtual core pointer id=2 master pointer (3)

⎜ ↳ Virtual core XTEST pointer id=4 slave pointer (2)

⎜ ↳ Liteon Dell Wireless Mouse WM118 Mouse id=6 slave pointer (2)

⎜ ↳ Liteon Dell Wireless Mouse WM118 Consumer Control id=7 slave pointer (2)

⎜ ↳ ImPS/2 Logitech Wheel Mouse id=12 slave pointer (2)

⎣ Virtual core keyboard id=3 master keyboard (2)

↳ Virtual core XTEST keyboard id=5 slave keyboard (3)

↳ Liteon Dell Wireless Mouse WM118 System Control id=8 slave keyboard (3)

↳ KNC-172F: Integrated HD Camera id=9 slave keyboard (3)

↳ SCI_EVT id=10 slave keyboard (3)

↳ AT Translated Set 2 keyboard id=11 slave keyboard (3)

↳ Liteon Dell Wireless Mouse WM118 Consumer Control id=13 slave keyboard (3)

可以看到id=12的就是触摸板设备,

使用 xinput disable 12 即可禁用触摸板
使用 xinput enable 12 即可开启触摸板

附: xinput --help

usage :

xinput get-feedbacks <device name>

xinput set-ptr-feedback <device name> <threshold> <num> <denom>

xinput set-integer-feedback <device name> <feedback id> <value>

xinput get-button-map <device name>

xinput set-button-map <device name> <map button 1> \ \[...]

xinput set-pointer <device name> \ \

xinput set-mode <device name> ABSOLUTE|RELATIVE

xinput list --short \|\| --long \|\| --name-only \|\| --id-only \...

xinput query-state <device name>

xinput test -proximity <device name>

xinput create-master <id> \ \

xinput remove-master <id> Floating\|AttachToMaster (dflt:Floating) \ \

xinput reattach <id> <master>

xinput float <id>

xinput set-cp <window> <device>

xinput test-xi2 --root <device>

xinput map-to-output <device> <output name>

xinput list-props <device> \ ...

xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> \ ...

xinput set-float-prop <device> <property> <val> \ ...

xinput set-atom-prop <device> <property> <val> \ ...

xinput watch-props <device>

xinput delete-prop <device> <property>

xinput set-prop <device> --type=atom\|float\|int --format=8\|16\|32 <property> <val> \ ...

xinput disable <device>

xinput enable <device>

查看id详细信息

$ xinput list 12

ImPS/2 Logitech Wheel Mouse id=12 slave pointer (2)

Reporting 7 classes:

Class originated from: 12. Type: XIButtonClass

Buttons supported: 7

Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"

Button state:

Class originated from: 12. Type: XIValuatorClass

Detail for Valuator 0:

Label: Rel X

Range: -1.000000 - -1.000000

Resolution: 0 units/m

Mode: relative

Class originated from: 12. Type: XIValuatorClass

Detail for Valuator 1:

Label: Rel Y

Range: -1.000000 - -1.000000

Resolution: 0 units/m

Mode: relative

Class originated from: 12. Type: XIValuatorClass

Detail for Valuator 2:

Label: Rel Horiz Scroll

Range: -1.000000 - -1.000000

Resolution: 0 units/m

Mode: relative

Class originated from: 12. Type: XIValuatorClass

Detail for Valuator 3:

Label: Rel Vert Scroll

Range: -1.000000 - -1.000000

Resolution: 0 units/m

Mode: relative

Class originated from: 12. Type: XIScrollClass

Scroll info for Valuator 2

type: 2 (horizontal)

increment: 15.000000

flags: 0x0

Class originated from: 12. Type: XIScrollClass

Scroll info for Valuator 3

type: 1 (vertical)

increment: 15.000000

flags: 0x0

相关推荐
w200512241 小时前
Pod管理
linux·服务器·云原生·容器·k8s·podman
chen<>2 小时前
C++ 六种 memory_order:从原子性到线程间可见性.md
java·linux·开发语言·c++
一直C2 小时前
Linux系统编程|进程间通信IPC全套详解(1)(管道、信号)
linux·c语言·开发语言·网络·青少年编程·visual studio code
库玛西3 小时前
Linux网络编程:HTTP/HTTPS协议核心技术全解析
linux·运维·服务器·网络·c++·http·https
sxd20013 小时前
Vmware和multicast
linux·windows·vmware·无线桥接·multicast
暴力求解3 小时前
Linux网络---NAT代理服务、内网穿透
linux·网络·智能路由器
一直C3 小时前
Linux系统编程|信号进阶 + SystemV IPC(消息队列、共享内存)
linux·c语言·开发语言·算法·青少年编程·vim
_F_y3 小时前
Linux网络常用指令
linux·运维·网络
老当益壮梁奶奶5 小时前
Linux软件编程学习笔记(九):消息队列、共享内存与信号灯详解
linux·c语言·笔记·学习
小雪崩5 小时前
嵌入式学习 day35:进程间通信-消息队列、共享空间及有名信号量
linux·c语言·学习