我刚刚在我的新电脑上安装了 ubuntu 16.04 作为双启动,并预装了 Windows(以防我每年需要两次……)HP Spectre x360 13-ac004nf在 Windows 下,触摸板工作正常且直观,但在 Ubuntu 上几乎无法使用。问题是按钮区域很敏感。换句话说,触摸板看起来不是这样的:
但像这样:
每次我将手指放在左键区域(不是单击)时,指针都会停止移动,因为系统检测到双指手势。以下是返回的配置synclient
:
Parameter settings:
LeftEdge = 1605
RightEdge = 5337
TopEdge = 1369
BottomEdge = 4487
FingerLow = 25
FingerHigh = 30
MaxTapTime = 180
MaxTapMove = 248
MaxDoubleTapTime = 100
SingleTapTimeout = 180
ClickTime = 100
EmulateMidButtonTime = 0
EmulateTwoFingerMinZ = 282
EmulateTwoFingerMinW = 7
VertScrollDelta = -113
HorizScrollDelta = -113
VertEdgeScroll = 0
HorizEdgeScroll = 0
CornerCoasting = 0
VertTwoFingerScroll = 1
HorizTwoFingerScroll = 1
MinSpeed = 1
MaxSpeed = 1.75
AccelFactor = 0.0353857
TouchpadOff = 2
LockedDrags = 0
LockedDragTimeout = 5000
RTCornerButton = 2
RBCornerButton = 3
LTCornerButton = 0
LBCornerButton = 0
TapButton1 = 1
TapButton2 = 3
TapButton3 = 0
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 = 28
VertHysteresis = 28
ClickPad = 1
RightButtonAreaLeft = 3471
RightButtonAreaRight = 0
RightButtonAreaTop = 4087
RightButtonAreaBottom = 0
MiddleButtonAreaLeft = 0
MiddleButtonAreaRight = 0
MiddleButtonAreaTop = 0
MiddleButtonAreaBottom = 0
以下是返回的内容less /var/log/Xorg.0.log | grep -i range
:
[ 5.776] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1302 - 5640 (res 37)
[ 5.776] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1116 - 4740 (res 64)
[ 5.776] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[ 5.776] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15
我尝试使用AreaBottomEdge
,但它只能禁用移动检测...这意味着触摸板仍然检测到有另一根手指触摸它,并进入双指手势模式(滚动)。我希望我的触摸板表现得像带有单独按钮的触摸板(如第一张图片),并且不会检测按钮区域上的任何东西。如何实现这一点?
答案1
我不确定你的问题是否有技术解决方案。如果是我,我可能只会插入鼠标,关闭触摸板,然后就完事了。
非技术解决方案
当您找不到基于软件的解决方案时,请换个角度。尝试获取一些卡片纸或其他东西。比打印纸重,比纸板轻。计算出您需要多少层。剪下刚好覆盖触摸板按钮区域按钮的部分,然后用一点热胶或其他稍后容易去除的东西将其固定在触摸板上。
它可能不太漂亮,但你的按钮将不再是触摸感应的,你仍然可以按下它们进行左键和右键单击。
答案2
首先执行 xinput list 来找到你的设备(我有一台 HP x360 i7-6500u)
~/devops > xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen Pen id=10 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=11 [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
....
你可以看到,在我的例子中,id 是 14 ( SynPS/2 Synaptics TouchPad
)
现在,再次查看此设备的功能
~/devops > xinput list-props "14" | grep Capabilities
Synaptics Capabilities (330): 1, 0, 0, 1, 1, 1, 1
如果您的第三个数字是零(像我一样),那么您就没有物理右键,这需要通过软件来“模拟”。
现在,将 /usr/share/X11/xorg.conf.d/50-synaptics.conf 复制到 /etc/X11/xorg.conf.d/
sudo cp -ax /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/
现在,在新文件中/etc/X11/xorg.conf.d/50-synaptics.conf
找到以下段落:
# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection
在选项“SoftButtonAreas”“50%0 82%0 0 0 0 0”之前添加两行:
Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0"
第一个必须启用右键单击,第二个必须启用中键单击。
您已在设置中启用“双指滚动”,禁用此功能以便仅在触摸板的右侧和底部滚动。
现在,注销、重新启动、再次登录,如果幸运的话,您的左/右区域一定已启用。