在 Windows 中,我可以根据需要配置 Synaptics TouchPad(和 TouchStyk)硬件单击按钮的操作。我怎样才能在 Kubuntu 中做到这一点?设置中没有触摸板按钮的选项。我只能交换鼠标按钮,并模拟触摸板角落的点击,这不是我想要的。我想将触摸板下方的右键单击硬件按钮更改为中键。
我的笔记本是这张图片中的型号:HP EliteBook 850 G2。如您所见,上方有 2 个按钮(用于“TouchStyk”/跟踪点),下方有 2 个按钮(用于触摸板)。我只想更改右下角的按钮,并保留其他按钮。
我该如何设置?我需要安装一些东西吗?如果它没有实现,我应该在哪里发布一个问题报告,要求这个功能?
我在命令行上运行了它,但我认为它没有帮助。有Synaptics Click Action (338): 1, 1, 0
,但info synaptics
似乎表明它用于点击板(我的不是点击板)。
顺便说一句,我认为这PS/2 Generic Mouse
可能是它在没有特定驱动程序实现的情况下识别“TouchStyk”(跟踪点)的方式。(但这不太相关,因为我希望能够更改的按钮主要是下面的那些,触摸板按钮)。
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ [...]
⎜ ↳ PS/2 Generic Mouse id=17 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=18 [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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ [...]
$ xinput list-props 18
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (165): 1
Coordinate Transformation Matrix (167): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (298): 1
Device Accel Constant Deceleration (299): 2.500000
Device Accel Adaptive Deceleration (300): 1.000000
Device Accel Velocity Scaling (301): 12.500000
Synaptics Edges (321): 1661, 5367, 1412, 4510
Synaptics Finger (322): 25, 30, 0
Synaptics Tap Time (323): 180
Synaptics Tap Move (324): 246
Synaptics Tap Durations (325): 180, 180, 100
Synaptics ClickPad (326): 0
Synaptics Middle Button Timeout (327): 75
Synaptics Two-Finger Pressure (328): 282
Synaptics Two-Finger Width (329): 7
Synaptics Scrolling Distance (330): 112, 112
Synaptics Edge Scrolling (331): 0, 1, 0
Synaptics Two-Finger Scrolling (332): 1, 0
Synaptics Move Speed (333): 1.000000, 1.750000, 0.035619, 0.000000
Synaptics Off (334): 0
Synaptics Locked Drags (335): 1
Synaptics Locked Drags Timeout (336): 250
Synaptics Tap Action (337): 0, 0, 0, 0, 1, 2, 0
Synaptics Click Action (338): 1, 1, 0
Synaptics Circular Scrolling (339): 0
Synaptics Circular Scrolling Distance (340): 0.100007
Synaptics Circular Scrolling Trigger (341): 0
Synaptics Circular Pad (342): 0
Synaptics Palm Detection (343): 0
Synaptics Palm Dimensions (344): 10, 200
Synaptics Coasting Speed (345): 1.000000, 50.000000
Synaptics Pressure Motion (346): 30, 225
Synaptics Pressure Motion Factor (347): 1.000000, 2.000000
Synaptics Resolution Detect (348): 1
Synaptics Grab Event Device (349): 0
Synaptics Gestures (350): 1
Synaptics Capabilities (351): 1, 0, 1, 1, 1, 1, 1
Synaptics Pad Resolution (352): 70, 43
Synaptics Area (353): 0, 0, 0, 0
Synaptics Noise Cancellation (354): 28, 28
Device Product ID (291): 2, 7
Device Node (290): "/dev/input/event7"
$ synclient -l
Parameter settings:
LeftEdge = 1661
RightEdge = 5367
TopEdge = 1412
BottomEdge = 4510
FingerLow = 25
FingerHigh = 30
MaxTapTime = 180
MaxTapMove = 246
MaxDoubleTapTime = 180
SingleTapTimeout = 180
ClickTime = 100
EmulateMidButtonTime = 75
EmulateTwoFingerMinZ = 282
EmulateTwoFingerMinW = 7
VertScrollDelta = 112
HorizScrollDelta = 112
VertEdgeScroll = 0
HorizEdgeScroll = 1
CornerCoasting = 0
VertTwoFingerScroll = 1
HorizTwoFingerScroll = 0
MinSpeed = 1
MaxSpeed = 1.75
AccelFactor = 0.0356189
TouchpadOff = 0
LockedDrags = 1
LockedDragTimeout = 250
RTCornerButton = 0
RBCornerButton = 0
LTCornerButton = 0
LBCornerButton = 0
TapButton1 = 1
TapButton2 = 2
TapButton3 = 0
ClickFinger1 = 1
ClickFinger2 = 1
ClickFinger3 = 0
CircularScrolling = 0
CircScrollDelta = 0.100007
CircScrollTrigger = 0
CircularPad = 0
PalmDetect = 0
PalmMinWidth = 10
PalmMinZ = 200
CoastingSpeed = 1
CoastingFriction = 50
PressureMotionMinZ = 30
PressureMotionMaxZ = 225
PressureMotionMinFactor = 1
PressureMotionMaxFactor = 2
ResolutionDetect = 1
GrabEventDevice = 0
TapAndDragGesture = 1
AreaLeftEdge = 0
AreaRightEdge = 0
AreaTopEdge = 0
AreaBottomEdge = 0
HorizHysteresis = 28
VertHysteresis = 28
ClickPad = 0
$ apt list *input* --installed
Listing... Pronto
inputattach/focal,now 1:1.7.0-1 amd64 [installed,automatic]
libinput-bin/focal-updates,now 1.15.5-1ubuntu0.2 amd64 [installed,automatic]
libinput10/focal-updates,now 1.15.5-1ubuntu0.2 amd64 [installed,automatic]
libqt5hunspellinputmethod5/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
libxcb-xinput0/focal,now 1.14-2 amd64 [installed,automatic]
xinput/focal,now 1.6.3-1 amd64 [installed,automatic]
xserver-xorg-input-all/focal,now 1:7.7+19ubuntu14 amd64 [installed,automatic]
xserver-xorg-input-libinput/focal,now 0.29.0-1 amd64 [installed,automatic]
xserver-xorg-input-synaptics/focal,now 1.9.1-1ubuntu3 amd64 [installed]
xserver-xorg-input-wacom/focal,now 1:0.39.0-0ubuntu1 amd64 [installed,automatic]
说明取自这篇文章。您可以使用 重新映射按钮
xinput set-button-map
。有趣的是,这篇文章声称这也应该在 Wayland 上工作,只是按钮映射可能不同,所以你需要重新配置它。另外,请注意,此命令的结果仅在您重新启动之前有效,因此您需要将该命令添加到自动启动。虽然,在 X11 上,您也可以使用 X11 配置文件进行设置,但 IMO 太复杂了,所以我的建议是:只需将命令添加到自动启动。
最后,请不要
xinput
像在帖子中那样使用数字标识符。这些可能与重新启动不同,因此在某些时候您可能最终会在错误的设备上设置属性。使用字符串标识符,如下所示。为了保持一致性,我将使用我系统中的示例。
首先,列出设备,找出哪一个是你的触摸板:
这里的触摸板是
DELL0768:00 06CB:7E92 Touchpad
。现在,让我们看看它的按钮图:根据我的理解,索引的含义可能会有所不同。要找到哪些按钮映射到您必须执行
xev
应用程序的索引,并尝试按下触摸板上的按钮。例子:在这里你可以看到
button 2
和button 3
是指数。这些事件是由我按下中间和右侧触摸板按钮触发的(要清楚:我没有硬件触摸板中间按钮,而是同时按下左右按钮。另外有趣的是,它是一个点击板,所以......是的,它也适用于点击板,以防有人想知道)。因此,现在您可以排列按钮:
瞧!现在,每当我按下触摸板上的右键时,我都会得到一个中间按钮事件。你甚至可以设置,比如说, a
1 2 2 4 5 6 7
(重复2
的 s),所以没有办法用触摸板触发右键单击。