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> [<map button 2> [...]]

xinput set-pointer <device name> [<x index> <y index>]

xinput set-mode <device name> ABSOLUTE|RELATIVE

xinput list [--short || --long || --name-only || --id-only] [<device name>...]

xinput query-state <device name>

xinput test [-proximity] <device name>

xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>]

xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>]

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> [<device> ...]

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

xinput set-float-prop <device> <property> <val> [<val> ...]

xinput set-atom-prop <device> <property> <val> [<val> ...]

xinput watch-props <device>

xinput delete-prop <device> <property>

xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<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

相关推荐
chlk1237 小时前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑8 小时前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件8 小时前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
深紫色的三北六号18 小时前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash1 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI1 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行2 天前
Linux和window共享文件夹
linux
木心月转码ing2 天前
WSL+Cpp开发环境配置
linux
崔小汤呀3 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应3 天前
vi编辑器使用
linux·后端·操作系统