Right-Click and ClickLock on Touch-Pad Mouse

I’m a new Linux user, and I’m having trouble with the mouse. My mouse is a touch-pad, and I’m using Leap 15.2 with KDE. As things stand now: Pressing my right-mouse button results in a left-click. That’s because the system doesn’t care if I’m pressing the left or right mouse button. It detects how many fingers I’m using to press the button. One finger gives me a left-click, two fingers gives me a right-click.

I don’t want that. I want pressing the right mouse button to give me a right-click, and pressing the left mouse button to give me a left-click. How do I do that? And to be clear: I’m not talking about tapping (I’ve disabled tap-to-click). I mean pressing the physical mouse buttons on the touch-pad.

Also, I’d like to enable ClickLock (at least, that’s what it’s called on Windows). In other words: When I’m dragging something with the mouse, I don’t want to have to hold the mouse button down the whole time I’m dragging. I want to hold the mouse button down for a second or two to get it to drag, then click the mouse when I’m done dragging.

Have you investigated KDE System Settings > Hardware > Input Devices for available touchpad settings?

Yes. But if there’s a setting to do that there, I’m not seeing it. Which is odd, because I ran into this same problem before (under Kubuntu), and I was able to fix it. I think in some sort of GUI settings window (maybe Settings > Hardware > Input Devices). But I don’t remember how I did it, and I can’t figure out how to do it now.

Here’s a graphical overview…
https://userbase.kde.org/System_Settings/Touchpad
The exact settings available may depend on the hardware and driver.

xinput --list devices
sudo libinput list-devices

It does not sound like touchpad (which normally has physical buttons) but like clickpad (which emulates button press). You need to tell more details on your hardware and also whether you are using X11 or Wayland.

I’ll see if I can get that information. But for now I’ll tell you this: It’s an old MacBook Pro, I think from 2010 or so. And it has physical buttons alright! It’s not obvious just by looking at the mouse, because the buttons are built into the area where you move your finger to move the cursor (that’s why the system knows how many fingers I’m using when I click). But I’m not tapping-to-click, there are physical buttons that I press to click.

It has one physical button and left/right clicks are emulated depending on finger position during click or number of fingers touching surface.

As I said, there is only one button.

It detects how many fingers I’m using to press the button. One finger gives me a left-click, two fingers gives me a right-click.

This is default behavior of libinput (which is usually used by default on Linux today) when having Apple devices.

I don’t want that. I want pressing the right mouse button to give me a right-click, and pressing the left mouse button to give me a left-click. How do I do that?
For low level settings we need to know whether you are using X11 or Wayland. May be there are applications that allow to do it.

When I’m dragging something with the mouse, I don’t want to have to hold the mouse button down the whole time I’m dragging.

I though it was default. I usually always struggle to disable it. Anyway, same answer - X11 and Wayland are configured in different places and in any case it depends on which input drivers you are using. Providing output of command that was already requested would have been a good start.

Huh. Didn’t occur to me that there’d only be one physical button.

I’m confused (like I said, I’m a new Linux user). You want me to put “xinput --list devices” and “sudo libinput list-devices” into the command line, and then paste the output into the forum here?

Yes. Inside tags [noparse]

...

[/noparse] please (you can also use # button when editing message).

I think I can do that. But you also wanted more details on my hardware and, to know if I used X11 or Wayland. Will “xinput --list devices” and “sudo libinput list-devices” be enough to tell you that?

So do it. You need to start somewhere.

xinput --list devices:

No protocol specified 
unable to find device devices

sudo libinput list-devices:

sudo: libinput: command not found

My bad. It should have been

xinput --list

sudo libinput list-devices:

sudo: libinput: command not found

You need to install libinput-tools first then…

sudo zypper in libinput-tools

xinput --list:

 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ bcm5974                                   id=11   [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)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Apple Computer, Inc. IR Receiver          id=9    [slave  keyboard (3)]
    ↳ Apple Inc. Apple Internal Keyboard / Trackpad     id=10   [slave  keyboard (3)]
    ↳ Built-in iSight: Built-in iSigh           id=12   [slave  keyboard (3)]

 

sudo libinput list-devices:

 Device:           Power Button
Kernel:           /dev/input/event3
Group:            1
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Power Button
Kernel:           /dev/input/event1
Group:            2
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Lid Switch
Kernel:           /dev/input/event0
Group:            3
Seat:             seat0, default
Capabilities:     switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Sleep Button
Kernel:           /dev/input/event2
Group:            4
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Apple Computer, Inc. IR Receiver
Kernel:           /dev/input/event4
Group:            5
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Apple Inc. Apple Internal Keyboard / Trackpad
Kernel:           /dev/input/event10
Group:            6
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           bcm5974
Kernel:           /dev/input/event11
Group:            6
Seat:             seat0, default
Size:             105x75mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge  
Click methods:    button-areas *clickfinger  
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Device:           Built-in iSight: Built-in iSigh
Kernel:           /dev/input/event12
Group:            7
Seat:             seat0, default
Capabilities:     keyboard  
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           HDA NVidia Headphone
Kernel:           /dev/input/event9
Group:            8
Seat:             seat0, default
Capabilities:      
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

 

This is your touch^Wclickpad. You are using X11.

Device:           bcm5974
Kernel:           /dev/input/event11

Click methods: button-areas *clickfinger

And default libinput click method for it is using multiple fingers, not areas on the surface.

Could you please provide output of

xinput list-props bcm5974
Invalid MIT-MAGIC-COOKIE-1 keyDevice 'bcm5974':
        Device Enabled (146):   1
        Coordinate Transformation Matrix (148): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (278):     1
        Device Accel Constant Deceleration (279):       2.500000
        Device Accel Adaptive Deceleration (280):       1.000000
        Device Accel Velocity Scaling (281):    12.500000
        Synaptics Edges (282):  -3642, 4348, 500, 6125
        Synaptics Finger (283): 70, 75, 0
        Synaptics Tap Time (284):       180
        Synaptics Tap Move (285):       515
        Synaptics Tap Durations (286):  180, 180, 100
        Synaptics ClickPad (287):       1
        Synaptics Middle Button Timeout (288):  0
        Synaptics Two-Finger Pressure (289):    283
        Synaptics Two-Finger Width (290):       7
        Synaptics Scrolling Distance (291):     234, 239
        Synaptics Edge Scrolling (292): 0, 0, 0
        Synaptics Two-Finger Scrolling (293):   1, 0
        Synaptics Move Speed (294):     1.000000, 1.750000, 0.016991, 0.000000
        Synaptics Off (295):    0
        Synaptics Locked Drags (296):   0
        Synaptics Locked Drags Timeout (297):   5000
        Synaptics Tap Action (298):     0, 0, 0, 0, 0, 0, 0
        Synaptics Click Action (299):   1, 3, 2
        Synaptics Circular Scrolling (300):     0
        Synaptics Circular Scrolling Distance (301):    0.100007
        Synaptics Circular Scrolling Trigger (302):     0
        Synaptics Circular Pad (303):   0
        Synaptics Palm Detection (304): 0
        Synaptics Palm Dimensions (305):        10, 200
        Synaptics Coasting Speed (306): 20.000000, 50.000000
        Synaptics Pressure Motion (307):        30, 160
        Synaptics Pressure Motion Factor (308): 1.000000, 1.000000
        Synaptics Grab Event Device (309):      0
        Synaptics Gestures (310):       0
        Synaptics Capabilities (311):   1, 0, 0, 1, 1, 1, 1
        Synaptics Pad Resolution (312): 90, 92
        Synaptics Area (313):   0, 0, 0, 0
        Synaptics Soft Button Areas (314):      0, 0, 0, 0, 0, 0, 0, 0
        Synaptics Noise Cancellation (315):     38, 27
        Device Product ID (270):        1452, 566
        Device Node (269):      "/dev/input/event10"


I did not expect to see Synaptics driver - I do not even have it installed. May be installer has some hardware detection database which still pulls it in.

Anyway. Synaptics explicitly disables soft buttons for your device. You should have /etc/X11/xorg.conf.d/70-synaptics.conf file which contains among other settings:

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

Try to set it back to default (these are the same values as this file sets for all other clickpads). Create file /etc/X11/xorg.conf.d/99-local.conf with content

# This option restores default software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Restore clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
EndSection

See “man 4 synaptics” for details on this option. You will need logout/login to activate it (it is possible to also change live using synclient or xinput commands). If this works, this will survive any driver update as well.

It is possible that KDE offers high level tools to configure this, I do not have any Leap 15.2 with KDE on X11 to test.

How do I do that?

With an editor (as root). For example

sudo nano /etc/X11/xorg.conf.d/99-local.conf
  • Add the required there and save when done. It will take effect when the X-server is next restarted (or just reboot).

How do I save in nano?

Edit: Nevermind, I figured it out