3

In Ubuntu 12.04 my Asus N56DP mapped both the right and left mouse buttons to be select, or left mouse button. To get a right click or context menu, I would use a two finger click. I quickly got used to this.

That all changed with 12.10 and later. I am now on Ubuntu 13.10. Now lmb is select and rmb is context menu.

Note this is one of those clickpad trackpads with two buttons underneath it. But physically the buttons are not separate, they are hidden under the trackpad. I now hate the right / left mouse button behavior. With no physical context clues you never know which button you're actually clicking anymore.

I'd like the old 12.04 functionality of treating this like a single button trackpad back, but can't figure out how to do it. All the research I've done so far shows how to re-order the buttons on a device but not how to reassign them in such a way that rmb and lmb are the same.

recap: I want lmb and rmb to initiate select. I want two finger click to initiate context menu.

    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
Scott Marlowe
  • 125
  • 11

2 Answers2

5

In terminal:

xinput --list

Will output something like this:

⎡ 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)]

Using the the device name you want to change ( e.g. I will change my touchpad's buttons, so I will use "SynPS/2 Synaptics TouchPad") do this:

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

E.g for me:

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

(Watch out for the case in the device name, because it is important.) After this both of your left and right clicks are treated as a left click and your middle click is treated as a right click. This is only temporarily, after a reboot the changes are lost. To make it permanent just make the /etc/lightdm/touchpad_setup file with the following contents:

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

and make it executable: sudo chmod +x /etc/lightdm/touchpad_setup. After that edit the /etc/lightdm/lightdm.conf file and add the following line to it under the [SeatDefaults] section:

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

(If you already had a session-setup-script in your lightdm.conf file then you will have to add the xinput set-button-map "YOUR_DEVICE" 1 3 1 4 5 6 7 8 9 line to the file pointed in those lines in lightdm.conf.)


Update 1:

Also you may want to take a look at the options of the synaptics driver. Based on what you wrote in the comments I think by modifying the

Option "ClickPad" "boolean"

          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"

or more likely the

Option "TapButton2" "integer"

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

option will solve your problem. Check your current settings with xinput --list-props "ETPS/2 Elantech Touchpad" or with synclient -l. Then modify your settings with either xinput or synclient, which you like more.


Update 2:

So you figured it out and you only had to disable the soft button area for the right button by setting every RightButtonArea* parameter to 0, with synclient RightButtonAreaLeft=0, synclient RightButtonAreaTop=0. (As the other were already on 0.) The same command with xinput would be xinput --set-prop "ETPS/2 Elantech Touchpad" "Synaptics Soft Button Areas" 0 0 0 0 0 0 0 0.

falconer
  • 14,868
  • 3
  • 46
  • 67
  • Well this is 99% of the way there! Thanks. But, two finger clicks no longer register as right click. Any way to keep that functionality? – Scott Marlowe Jan 11 '14 at 20:21
  • I'm beginning to think the change needed would be lower level than this. sigh. – Scott Marlowe Jan 11 '14 at 20:23
  • @ScottMarlowe I could only test it with my touchpad. Normally X treats a right+left click as a middle click for touchpads. For me on my touchpad this solution generates a right click if I press both buttons, because it is emulated as a middle click. Please post the output of `xinput --list-props YOUR_DEVICE`. Maybe we just have to increase the middle button timeout a bit, and then it will be OK. – falconer Jan 11 '14 at 20:57
  • Ahh I see the difference. My machine has a clickpad, with no visible buttons. With two fingers clicking at the same time (anywhere not just down near the "button areas") I get a right click. also a two finger tap does the same thing. With these settings the two finger tap or two finger click gets reassigned to lmb. – Scott Marlowe Jan 11 '14 at 21:37
  • @ScottMarlowe Okay. I can't test that. But if you say that the this setup changed something to behave as a left click, than try `xinput set-button-map "YOUR_DEVICE" 1 3 3 4 5 6 7 8 9` instead. (That means we don't redirect hardware button 3 to button 1, but keep it as button 3. We only redirect button 2 to button 3.) – falconer Jan 11 '14 at 22:09
  • @ScottMarlowe also that `xinput --list-props YOUR_DEVICE` would help in the solving of this. So please update your question with that one. – falconer Jan 11 '14 at 22:17
  • I tried the various combos including the one you listed. That turns a right click into a middle click, and hence double finger tap or two finger click becomes middle button. The problem here is that by the time we get to this level of abstraction right click, double finger tap and two finger click are ALL mapped to the right mouse button. Moving one moves them all. I don't want that. All I want is the right mouse button to be mapped to the left mouse button, but two finger tap or click be right mouse button. Otherwise I have NO WAY to actually right click (i.e. context menu) click stuff. – Scott Marlowe Jan 11 '14 at 22:52
  • I think the setting I'm looking for will be somewhere in the driver level, not the xinput. Just a guess. But I can't find anything on configuring the driver. – Scott Marlowe Jan 11 '14 at 22:53
  • @ScottMarlowe With `xinput` or with `synclient` we are actually configuring the synaptics driver. Yes, there is a kernel driver for the device too, but I can hardly believe that it was modified in such a way that it now hides the difference between a two finger click and a right click. I updated my answer with some possible solutions. (If you don't provide us with the output of `xinput --list-props "ETPS/2 Elantech Touchpad"` or `synclient -l` I can't give proper commands, just a guideline.) Hope my updated answer helps to figure it out. – falconer Jan 11 '14 at 23:38
  • Winner winner chicken dinner! I got it with synclient. Thanks so much for the help. – Scott Marlowe Jan 11 '14 at 23:54
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/12440/discussion-between-scott-marlowe-and-falconer) – Scott Marlowe Jan 12 '14 at 02:54
  • Can confirm that doing only update two works for my "ETPS/2 Elantech Touchpad" device. – Steven Roose Aug 15 '14 at 10:42
0

You may try

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