ubuntu 关闭/打开触摸板功能
2013-07-23 21:43
447 查看
1、先通过 xinput 查看一下有哪些输入设备,找出触摸板的名称,执行 xinput list 得出结果大致如下:
⎡ Virtual core pointer id=2
[master pointer (3)]
⎜ ↳ Virtual core XTEST pointer
id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver
id=11 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver
id=12 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad
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)]
从上面结果,可以看出触摸板名称为"SynPS/2 Synaptics TouchPad",id为14。
2、再通过 xinput list-props 14 查看触摸板所有相关属性,结果大致如下:
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (132):
0
Coordinate Transformation Matrix (134):
1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (260):
1
Device Accel Constant Deceleration (261):
2.500000
Device Accel Adaptive Deceleration (262):
1.000000
Device Accel Velocity Scaling (263):
12.500000
Synaptics Edges (285):
1768, 5406, 1640, 4498
Synaptics Finger (286):
25, 30, 256
Synaptics Tap Time (287):
180
Synaptics Tap Move (288):
236
Synaptics Tap Durations (289):
180, 180, 100
其中“Device Enabled (132)”就是用来控制是否开启的,值 0:代表禁用,1:代表启用。
3、然后再通过 xinput set-prop 更改其属性值,如: xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0,但如果每次都需要敲这么长的命令肯定是不可能的,我们可以通过在 ~/.bashrc文件中添加命令别名,如:
alias tpOff="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0"
alias tpOn="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 1"
成功添加之后,再执行 source ~/.bashrc ,就可以通过 tpOff 、tpOn灵活设置了
⎡ Virtual core pointer id=2
[master pointer (3)]
⎜ ↳ Virtual core XTEST pointer
id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver
id=11 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver
id=12 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad
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)]
从上面结果,可以看出触摸板名称为"SynPS/2 Synaptics TouchPad",id为14。
2、再通过 xinput list-props 14 查看触摸板所有相关属性,结果大致如下:
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (132):
0
Coordinate Transformation Matrix (134):
1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (260):
1
Device Accel Constant Deceleration (261):
2.500000
Device Accel Adaptive Deceleration (262):
1.000000
Device Accel Velocity Scaling (263):
12.500000
Synaptics Edges (285):
1768, 5406, 1640, 4498
Synaptics Finger (286):
25, 30, 256
Synaptics Tap Time (287):
180
Synaptics Tap Move (288):
236
Synaptics Tap Durations (289):
180, 180, 100
其中“Device Enabled (132)”就是用来控制是否开启的,值 0:代表禁用,1:代表启用。
3、然后再通过 xinput set-prop 更改其属性值,如: xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0,但如果每次都需要敲这么长的命令肯定是不可能的,我们可以通过在 ~/.bashrc文件中添加命令别名,如:
alias tpOff="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0"
alias tpOn="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 1"
成功添加之后,再执行 source ~/.bashrc ,就可以通过 tpOff 、tpOn灵活设置了
相关文章推荐
- ubuntu关闭自动更新、打开 ubuntu 的 apport 崩溃检测报告功能
- Ubuntu下关闭/打开触摸板
- Ubuntu下打开和关闭笔记本触摸板的方法
- Ubuntu 12.04 or 14.04 下USB存储设备自动挂载和自动打开功能的开启和关闭
- Ubuntu下如何打开/关闭 触摸板
- win7 64 系统中打开或关闭windows功能空白
- 怎样打开64位 Ubuntu 的32位支持功能?
- ubuntu下,thinkpad触摸板关闭方法
- ubuntu 16.04 LTS - 打开和关闭 Terminal
- 打开或关闭oracle数据库的闪回功能步骤
- 小米笔记本12.5英寸装ubuntu后设置快捷键开启和关闭触摸板
- 利用GridView显示主细表并添加打开、关闭功能
- 【已解决】谷歌Chrome浏览器中如何打开或关闭网页的自动翻译功能?
- Ubuntu Qt5 实现打开多张本地图片并显示到窗口功能
- iOS 开发 Pch 文件的正确使用1.存放一些全局的宏(整个项目中都用得上的宏) 2.用来包含一些全部的头文件(整个项目中都用得上的头文件) 3.能自动打开或者关闭日志输出功能
- Ubuntu下如何关闭触摸板
- ubuntu 关闭外界设备自动打开
- 在 Ubuntu 环境下实现插入鼠标自动关闭触摸板
- ubuntu下打开,关闭,重启apache的方法
- 怎样打开64位 Ubuntu 的32位支持功能?