要鼠标左右键来同时选择地图

要鼠标左右键来同时选择地图

在 Ubuntu 12.04 中,我的 Asus N56DP 将鼠标左键和右键都映射为选择或鼠标左键。要获得右键单击或上下文菜单,我会使用两根手指单击。我很快就习惯了这一点。

这一切都在 12.10 及更高版本中发生了变化。我现在使用的是 Ubuntu 13.10。现在 lmb 是选择,rmb 是上下文菜单。

请注意,这是带有两个按钮的触控板之一。但实际上,这些按钮并不是分开的,它们隐藏在触控板下方。我现在讨厌鼠标右/左按钮的行为。没有物理上下文线索,您永远不知道您实际上点击的是哪个按钮。

我希望恢复 12.04 旧版的功能,将其视为单按钮触控板,但不知道该怎么做。到目前为止,我所做的所有研究都显示了如何重新排列设备上的按钮,但没有显示如何重新分配它们,使 rmb 和 lmb 相同。

回顾:我希望使用 lmb 和 rmb 来启动选择。我希望使用两根手指单击来启动上下文菜单。

    xinput --list
 Virtual core pointer                       id=2    [master pointer  (3)]
   ↳ Virtual core XTEST pointer                 id=4    [slave  pointer  (2)]
   ↳ ETPS/2 Elantech Touchpad                   id=14   [slave  pointer  (2)]


xinput --list-props "ETPS/2 Elantech Touchpad"
Device 'ETPS/2 Elantech Touchpad':
    Device Enabled (144):   1
    Coordinate Transformation Matrix (146): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (267): 1
    Device Accel Constant Deceleration (268):   2.500000
    Device Accel Adaptive Deceleration (269):   1.000000
    Device Accel Velocity Scaling (270):    12.500000
    Synaptics Edges (271):  136, 3284, 110, 1942
    Synaptics Finger (272): 1, 1, 0
    Synaptics Tap Time (273):   180
    Synaptics Tap Move (274):   175
    Synaptics Tap Durations (275):  180, 180, 100
    Synaptics ClickPad (276):   1
    Synaptics Middle Button Timeout (277):  0
    Synaptics Two-Finger Pressure (278):    282
    Synaptics Two-Finger Width (279):   7
    Synaptics Scrolling Distance (280): 79, 79
    Synaptics Edge Scrolling (281): 0, 0, 0
    Synaptics Two-Finger Scrolling (282):   1, 1
    Synaptics Move Speed (283): 1.000000, 1.750000, 0.050150, 0.000000
    Synaptics Off (284):    0
    Synaptics Locked Drags (285):   0
    Synaptics Locked Drags Timeout (286):   5000
    Synaptics Tap Action (287): 2, 3, 0, 0, 1, 3, 0
    Synaptics Click Action (288):   1, 3, 0
    Synaptics Circular Scrolling (289): 0
    Synaptics Circular Scrolling Distance (290):    0.100000
    Synaptics Circular Scrolling Trigger (291): 0
    Synaptics Palm Detection (292): 0
    Synaptics Palm Dimensions (293):    10, 200
    Synaptics Coasting Speed (294): 20.000000, 50.000000
    Synaptics Pressure Motion (295):    30, 160
    Synaptics Pressure Motion Factor (296): 1.000000, 1.000000
    Synaptics Resolution Detect (297):  1
    Synaptics Grab Event Device (298):  1
    Synaptics Gestures (299):   1
    Synaptics Capabilities (300):   1, 0, 0, 1, 1, 1, 1
    Synaptics Pad Resolution (301): 31, 31
    Synaptics Area (302):   0, 0, 0, 0
    Synaptics Soft Button Areas (303):  1710, 0, 1682, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (304): 19, 19
    Device Product ID (260):    2, 14
    Device Node (261):  "/dev/input/event7"

synclient -l
Parameter settings:
    LeftEdge                = 136
    RightEdge               = 3284
    TopEdge                 = 110
    BottomEdge              = 1942
    FingerLow               = 1
    FingerHigh              = 1
    MaxTapTime              = 180
    MaxTapMove              = 175
    MaxDoubleTapTime        = 180
    SingleTapTimeout        = 180
    ClickTime               = 100
    EmulateMidButtonTime    = 0
    EmulateTwoFingerMinZ    = 282
    EmulateTwoFingerMinW    = 7
    VertScrollDelta         = 79
    HorizScrollDelta        = 79
    VertEdgeScroll          = 0
    HorizEdgeScroll         = 0
    CornerCoasting          = 0
    VertTwoFingerScroll     = 1
    HorizTwoFingerScroll    = 1
    MinSpeed                = 1
    MaxSpeed                = 1.75
    AccelFactor             = 0.0501505
    TouchpadOff             = 0
    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
    PalmDetect              = 0
    PalmMinWidth            = 10
    PalmMinZ                = 200
    CoastingSpeed           = 20
    CoastingFriction        = 50
    PressureMotionMinZ      = 30
    PressureMotionMaxZ      = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    ResolutionDetect        = 1
    GrabEventDevice         = 1
    TapAndDragGesture       = 1
    AreaLeftEdge            = 0
    AreaRightEdge           = 0
    AreaTopEdge             = 0
    AreaBottomEdge          = 0
    HorizHysteresis         = 19
    VertHysteresis          = 19
    ClickPad                = 1
    RightButtonAreaLeft     = 1710
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 1682
    RightButtonAreaBottom   = 0
    MiddleButtonAreaLeft    = 0
    MiddleButtonAreaRight   = 0
    MiddleButtonAreaTop     = 0
    MiddleButtonAreaBottom  = 0

答案1

在终端:

xinput --list

将会输出类似这样的内容:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [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)]
    ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]
    ↳ Toshiba input device                      id=11   [slave  keyboard (3)]

使用您想要更改的设备名称(例如,我将更改触摸板的按钮,因此我将使用"SynPS/2 Synaptics TouchPad")执行以下操作:

xinput set-button-map "YOUR_DEVICE" 1 3 1 4 5 6 7 8 9 

比如我:

xinput set-button-map "SynPS/2 Synaptics TouchPad" 1 3 1 4 5 6 7 8 9

(注意设备名称的大小写,因为它很重要。)此后,左键和右键单击都被视为左键单击,中键单击被视为右键单击。这只是暂时的,重启后更改将丢失。要使其永久生效,只需使用/etc/lightdm/touchpad_setup以下内容创建文件:

#!/bin/bash
xinput set-button-map "YOUR_DEVICE" 1 3 1 4 5 6 7 8 9
exit 0

并使其可执行:sudo chmod +x /etc/lightdm/touchpad_setup。之后编辑/etc/lightdm/lightdm.conf文件并在 [SeatDefaults] 部分下添加以下行:

session-setup-script=/etc/lightdm/touchpad_setup

(如果您的文件中已经有会话设置脚本,lightdm.conf那么您必须将该xinput set-button-map "YOUR_DEVICE" 1 3 1 4 5 6 7 8 9行添加到中这些行指向的文件中lightdm.conf。)


更新 1:

您可能还想看看synaptics 驱动程序的选项。根据你在评论中写的内容,我认为通过修改

选项“ClickPad”“布尔值”

          Whether  the  device  is  a  click  pad.  A click pad device has
          button(s) integrated into the touchpad surface.  The  user  must
          press  downward  on  the touchpad in order to generated a button
          press. This property may be set automatically  if  a  click  pad
          device  is detected at initialization time. Property: "Synaptics
          ClickPad"

或者更可能是

选项“TapButton2”“整数”

          Which mouse button is reported on a non-corner  two-finger  tap.
          Set to 0 to disable. Property: "Synaptics Tap Action"

选项将解决您的问题。使用xinput --list-props "ETPS/2 Elantech Touchpad"或 使用检查您当前的设置synclient -l。然后使用xinput或修改您的设置synclient(您更喜欢哪个)。


更新 2:

所以你明白了,你只需要通过设置每个右按钮区域* 参数为 0,带有synclient RightButtonAreaLeft=0synclient RightButtonAreaTop=0。 (因为其他的已经在 0 上了。)带有 的相同命令xinput将是xinput --set-prop "ETPS/2 Elantech Touchpad" "Synaptics Soft Button Areas" 0 0 0 0 0 0 0 0

答案2

你可以尝试

gsettings set org.gnome.desktop.peripherals.touchpad click-method fingers

相关内容