如何启用按下中间点击板按钮时的滚动功能?

如何启用按下中间点击板按钮时的滚动功能?

我有一台配备点击板的联想 ThinkPad Yoga。我想使用中间的点击板按钮启用滚动功能。因此,我希望能够通过按住中间按钮然后在要滚动的方向移动鼠标来滚动编辑器。我已将此点击板设置为可识别与鼠标按钮 1、2 和 3 相对应的三个软按钮。Synaptics 配置如下:

Section "InputClass"
    Identifier "Default clickpad buttons"
    MatchDriver "synaptics"
    Option "SoftButtonAreas" "64% 0 1 42% 36% 64% 1 42%"
    Option "AreaBottomEdge" "1"
EndSection

xinput 设备列表(xinput --list)如下:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=9    [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 EC Pen stylus                 id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 EC Pen eraser                 id=15   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=16   [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)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=14   [slave  keyboard (3)]

指点杆设备 (xinput --list-props "TPPS/2 IBM TrackPoint") 的 xinput 属性列表如下:

Device 'TPPS/2 IBM TrackPoint':
    Device Enabled (134):   1
    Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (262): 0
    Device Accel Constant Deceleration (263):   1.000000
    Device Accel Adaptive Deceleration (264):   1.000000
    Device Accel Velocity Scaling (265):    10.000000
    Device Product ID (251):    2, 10
    Device Node (252):  "/dev/input/event15"
    Evdev Axis Inversion (266): 0, 0
    Evdev Axes Swap (268):  0
    Axis Labels (269):  "Rel X" (144), "Rel Y" (145)
    Button Labels (270):    "Button Left" (137), "Button Middle" (138), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141), "Button Horiz Wheel Left" (142), "Button Horiz Wheel Right" (143)
    Evdev Middle Button Emulation (271):    0
    Evdev Middle Button Timeout (272):  50
    Evdev Third Button Emulation (273): 0
    Evdev Third Button Emulation Timeout (274): 1000
    Evdev Third Button Emulation Button (275):  3
    Evdev Third Button Emulation Threshold (276):   20
    Evdev Wheel Emulation (277):    1
    Evdev Wheel Emulation Axes (278):   6, 7, 4, 5
    Evdev Wheel Emulation Inertia (279):    10
    Evdev Wheel Emulation Timeout (280):    200
    Evdev Wheel Emulation Button (281): 2
    Evdev Drag Lock Buttons (282):  0

clickpad 设备的 xinput 属性列表 (xinput --list-props "SynPS/2 Synaptics TouchPad") 如下:

Device 'SynPS/2 Synaptics TouchPad':
    Device Enabled (134):   1
    Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (262): 1
    Device Accel Constant Deceleration (263):   2.500000
    Device Accel Adaptive Deceleration (264):   1.000000
    Device Accel Velocity Scaling (265):    12.500000
    Synaptics Edges (308):  1768, 5414, 1638, 4466
    Synaptics Finger (309): 25, 30, 0
    Synaptics Tap Time (310):   180
    Synaptics Tap Move (311):   235
    Synaptics Tap Durations (312):  180, 180, 100
    Synaptics ClickPad (313):   1
    Synaptics Middle Button Timeout (314):  0
    Synaptics Two-Finger Pressure (315):    282
    Synaptics Two-Finger Width (316):   7
    Synaptics Scrolling Distance (317): 107, 107
    Synaptics Edge Scrolling (318): 0, 0, 0
    Synaptics Two-Finger Scrolling (319):   1, 1
    Synaptics Move Speed (320): 1.000000, 1.750000, 0.037293, 0.000000
    Synaptics Off (321):    0
    Synaptics Locked Drags (322):   0
    Synaptics Locked Drags Timeout (323):   5000
    Synaptics Tap Action (324): 2, 3, 0, 0, 1, 3, 0
    Synaptics Click Action (325):   1, 3, 0
    Synaptics Circular Scrolling (326): 0
    Synaptics Circular Scrolling Distance (327):    0.100000
    Synaptics Circular Scrolling Trigger (328): 0
    Synaptics Palm Detection (329): 0
    Synaptics Palm Dimensions (330):    10, 200
    Synaptics Coasting Speed (331): 20.000000, 50.000000
    Synaptics Pressure Motion (332):    30, 160
    Synaptics Pressure Motion Factor (333): 1.000000, 1.000000
    Synaptics Resolution Detect (334):  1
    Synaptics Grab Event Device (335):  1
    Synaptics Gestures (336):   1
    Synaptics Capabilities (337):   1, 0, 0, 1, 1, 1, 1
    Synaptics Pad Resolution (338): 55, 53
    Synaptics Area (339):   0, 0, 0, 1
    Synaptics Soft Button Areas (340):  4184, 0, 1, 2788, 2997, 4184, 1, 2788
    Synaptics Noise Cancellation (341): 8, 8
    Device Product ID (251):    2, 7
    Device Node (252):  "/dev/input/event10"

按钮使用的示例xev输出如下:

ButtonPress event, serial 40, synthetic NO, window 0x5200001,
    root 0x9e, subw 0x0, time 17803214, (103,77), root:(1845,126),
    state 0x0, button 2, same_screen YES

ButtonRelease event, serial 40, synthetic NO, window 0x5200001,
    root 0x9e, subw 0x0, time 17803294, (103,77), root:(1845,126),
    state 0x200, button 2, same_screen YES

如果您能提供任何有关启用中间按钮滚动的指导,我将不胜感激。谢谢!

编辑:我购买了一款外置 ThinkPad USB 键盘,它同时配有 TrackPoint 指点杆和三个专用鼠标按钮。我已使用此键盘成功执行了向上滚动和向下滚动操作,并记录了相关输出xev

以下是xev成功向上滚动操作的输出:

ButtonPress event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x4c00002, time 53834970, (55,63), root:(1797,1083),
    state 0x0, button 5, same_screen YES

EnterNotify event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x0, time 53834946, (55,63), root:(1797,1083),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 4096

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  4294967198 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

ButtonRelease event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x4c00002, time 53834970, (55,63), root:(1797,1083),
    state 0x1000, button 5, same_screen YES

LeaveNotify event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x0, time 53834946, (55,63), root:(1797,1083),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0

以下是xev成功向下滚动操作的输出:

ButtonPress event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x4c00002, time 53829778, (55,63), root:(1797,1083),
    state 0x0, button 5, same_screen YES

EnterNotify event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x0, time 53829754, (55,63), root:(1797,1083),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 4096

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  4294967198 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

ButtonRelease event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x4c00002, time 53829778, (55,63), root:(1797,1083),
    state 0x1000, button 5, same_screen YES

LeaveNotify event, serial 40, synthetic NO, window 0x4c00001,
    root 0x9e, subw 0x0, time 53829754, (55,63), root:(1797,1083),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0

那么,有了这些额外的信息,你们这些好心、聪明的人能不能指点一下如何在我的 ThinkPad 上实现这种滚动功能?:)

答案1

您是否尝试过xinput像链接中提到的那样进行设置在此主题中? 所识别的设备TPPS/2 IBM TrackPoint与那里解释的完全一致。

相关内容