我想(暂时)禁用在键盘上打字时禁用触摸板点击的功能,以便能够玩需要同时通过鼠标和键盘进行交互的游戏,而无需使用物理外接鼠标。
换句话说,如何才能同时按下键盘上的按键并点击内容?
到目前为止,我在 Ask Ubuntu 上找到的所有内容都是相反的,如何在打字时禁用触摸板。
一些系统信息,我正在运行 Ubuntu 16.04,并将xinput
我的触摸板列为
SYN1B7F:00 06CB:7406 Touchpad
更新:阅读后我尝试了这篇关于 ElementaryOS 的文章。
首先,和列出的xinput
属性synclient
:
$ xinput | grep Touchpad
⎜ ↳ SYN1B7F:00 06CB:7406 Touchpad id=11 [slave pointer (2)]
$ xinput list-props 11
Device 'SYN1B7F:00 06CB:7406 Touchpad':
Device Enabled (169): 1
Coordinate Transformation Matrix (171): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (294): 1
Device Accel Constant Deceleration (295): 2.500000
Device Accel Adaptive Deceleration (296): 1.000000
Device Accel Velocity Scaling (297): 12.500000
Synaptics Edges (298): 49, 1187, 48, 850
Synaptics Finger (299): 25, 30, 0
Synaptics Tap Time (300): 180
Synaptics Tap Move (301): 67
Synaptics Tap Durations (302): 180, 100, 100
Synaptics ClickPad (303): 1
Synaptics Middle Button Timeout (304): 0
Synaptics Two-Finger Pressure (305): 282
Synaptics Two-Finger Width (306): 7
Synaptics Scrolling Distance (307): 30, 30
Synaptics Edge Scrolling (308): 0, 0, 0
Synaptics Two-Finger Scrolling (309): 1, 1
Synaptics Move Speed (310): 1.000000, 1.750000, 0.130976, 0.000000
Synaptics Off (311): 2
Synaptics Locked Drags (312): 0
Synaptics Locked Drags Timeout (313): 5000
Synaptics Tap Action (314): 2, 3, 0, 0, 1, 3, 2
Synaptics Click Action (315): 1, 3, 0
Synaptics Circular Scrolling (316): 0
Synaptics Circular Scrolling Distance (317): 0.100000
Synaptics Circular Scrolling Trigger (318): 0
Synaptics Circular Pad (319): 0
Synaptics Palm Detection (320): 0
Synaptics Palm Dimensions (321): 10, 200
Synaptics Coasting Speed (322): 20.000000, 50.000000
Synaptics Pressure Motion (323): 30, 160
Synaptics Pressure Motion Factor (324): 1.000000, 1.000000
Synaptics Resolution Detect (325): 1
Synaptics Grab Event Device (326): 0
Synaptics Gestures (327): 1
Synaptics Capabilities (328): 1, 0, 0, 1, 1, 0, 0
Synaptics Pad Resolution (329): 12, 12
Synaptics Area (330): 0, 0, 0, 0
Synaptics Soft Button Areas (331): 618, 0, 736, 0, 0, 0, 0, 0
Synaptics Noise Cancellation (332): 7, 7
Device Product ID (289): 1739, 29702
Device Node (290): "/dev/input/event12"
$ synclient
Parameter settings:
LeftEdge = 49
RightEdge = 1187
TopEdge = 48
BottomEdge = 850
FingerLow = 25
FingerHigh = 30
MaxTapTime = 180
MaxTapMove = 67
MaxDoubleTapTime = 100
SingleTapTimeout = 180
ClickTime = 100
EmulateMidButtonTime = 0
EmulateTwoFingerMinZ = 282
EmulateTwoFingerMinW = 7
VertScrollDelta = 30
HorizScrollDelta = 30
VertEdgeScroll = 0
HorizEdgeScroll = 0
CornerCoasting = 0
VertTwoFingerScroll = 1
HorizTwoFingerScroll = 1
MinSpeed = 1
MaxSpeed = 1.75
AccelFactor = 0.130976
TouchpadOff = 2
LockedDrags = 0
LockedDragTimeout = 5000
RTCornerButton = 2
RBCornerButton = 3
LTCornerButton = 0
LBCornerButton = 0
TapButton1 = 1
TapButton2 = 3
TapButton3 = 2
ClickFinger1 = 1
ClickFinger2 = 3
ClickFinger3 = 0
CircularScrolling = 0
CircScrollDelta = 0.1
CircScrollTrigger = 0
CircularPad = 0
PalmDetect = 0
PalmMinWidth = 10
PalmMinZ = 200
CoastingSpeed = 20
CoastingFriction = 50
PressureMotionMinZ = 30
PressureMotionMaxZ = 160
PressureMotionMinFactor = 1
PressureMotionMaxFactor = 1
ResolutionDetect = 1
GrabEventDevice = 0
TapAndDragGesture = 1
AreaLeftEdge = 0
AreaRightEdge = 0
AreaTopEdge = 0
AreaBottomEdge = 0
HorizHysteresis = 7
VertHysteresis = 7
ClickPad = 1
RightButtonAreaLeft = 618
RightButtonAreaRight = 0
RightButtonAreaTop = 736
RightButtonAreaBottom = 0
MiddleButtonAreaLeft = 0
MiddleButtonAreaRight = 0
MiddleButtonAreaTop = 0
MiddleButtonAreaBottom = 0
因此,从我所读的内容来看,TouchpadOff
在synclient
和Synaptics Off (311)
中xinput
应该有有趣的设置:0 =“始终启用”,1 =“始终禁用”,2 =“键入时禁用”
我尝试过改变它(仅通过xinput
或仅通过synclient
以及同时通过两者,多次):
$ xinput set-prop 11 311 0
$ synclient TouchpadOff=0
但是,这些设置并不是持久的。检查值立即地设置后,显示更改为 0,正如预期的那样:
$ xinput list-props 11 | grep Off
Synaptics Off (311): 0
$ synclient | grep TouchpadOff
TouchpadOff = 0
但仅仅几秒钟之后,值就会自动重置回 2:
$ xinput list-props 11 | grep Off
Synaptics Off (311): 2
$ synclient | grep TouchpadOff
TouchpadOff = 2
但请注意,其他设置(例如synclient TapButton3=2
,我使用它来启用三指点击作为中键单击)可以正常工作并且不会重置。
我不知道这里发生了什么以及为什么。请帮助我正确且持续地设置此配置,以便即使在打字时也能启用触摸板。
答案1
我可以设置触摸板在当前会话中始终启用,即使在打字时也是如此,只需终止syndaemon
进程. 这也会自动TouchpadOff=0
生效。synclient
killall syndaemon
但这不会阻止syndaemon
下次重启(或登录?)时自动启动。
要在再次打字时禁用触摸板,您可以重新启动或syndaemon
通过运行重新启动
syndaemon -i 1.0 -t -K -R -d
再次,这会自动处理其自身的TouchpadOff=2
设置synclient
。