Touchpad configuration Leap 16

Problem description

I recently bought a HP Envy laptop and installed Leap 16 on it, and use the KDE desktop. I have been struggling with the touchpad ever since. Very often when I click somewhere, it does a middle click instead of a left click (resulting in unexpected text to be entered or a browser tab to be closed instead of selected), and my right click seems to only work if I click in the very bottom-right corner. The impression I have is that

  • The right mouse click button is only tiny (I would want it to be 10% to 15% of the touchpad size, not something like 1%)
  • Clicking where the left mouse button should be while another finger is still on the touchpad results in a middle click.

Regarding the last issue: I am used to use my right finger for “moving” the mouse and my left finger to click. In the past, I have always been able to keep my right finger on the touchpad while clicking; now that doesn’t seem to work. The work-around is to position the mouse cursor, stop, lift my finger from the touchpad, and then click. Which is extremely cumbersome.

I have also realized that originally laptops used to have two physical buttons for mouse clicks, so left and right click were unambiguous. With the HP Envy computer the whole touchpad seems to be a single button, so clicking anywhere results in a “click” event, and the software will have to figure out whether that is a left, middle, or right click. It seems the problem is with how the software it making that determination.

Configuration

In the KDE System Settings I have the following for Input & Output > Mouse & Touchpad > Touchpad:

  • General: check Device enabled, check Disable while type
  • Pointer speed: 0.50, check enable pointer acceleration
  • Scrolling: Touchpad edges, check Disable horizontal scrolling
  • Tapping: uncheck Tap-to-click
  • Integrated right-click: select Press bottom-right corner

I have tried creating a 70-synaptics.conf file in /etc/X11/xorg.conf.c with a “SoftButtonAreas” option based on a post I found when Google my problem, but that didn’t have any effect, I guess because Leap 16 uses libinput rather than synaptics? I tried changing the driver name from “synaptics” to “libinput” but that didn’t help. Makes sense, the libinput option names might be different. I tried multiple times searching for how to configure libinput; I keep getting results that you can configure all kinds of things, but none of them seem to say how to configure them in the X11 configuration files.

Desired Outcome

What I’m looking for is ideally a way to configure my touchpad so that, when I activate the physical click on the touchpad, the software looks for any touches in the bottom part of the touchpad only (ignoring any touches in the middle and upper part) and use the location of the bottom touch to identify which click to issue.

I will be happy to provide additional details to help resolve this problem.

I take from your mentioning of Xorg config files that you are using Plasma X11 sessions. Just to clarify up front that the Synaptics driver only works with X11 sessions - it cannot be used in Wayland sessions. I can try to assist if you really want to go down that path, but otherwise I’d recommend staying with libinput.

As you’ve found out, the whole pad is treated as one physical button, which is why the software has to determine left, right, and middle clicks based on finger position.

To get behavior closer to what you want under libinput, create a file /etc/X11/xorg.conf.d/99-hp-envy-touchpad.conf with the following content…

Section "InputClass"
    Identifier "HP Envy Touchpad"
    MatchIsTouchpad "on"
    Driver "libinput"
    Option "ClickMethod" "buttonareas"
    Option "MiddleEmulation" "off"
    Option "Tapping" "off"
EndSection

ClickMethod "buttonareas" treats the bottom of the touchpad as physical click zones (left/right), similar to the old Synaptics SoftButtonAreas. Tapping "off": disables tap-to-click as desired. However, the Plasma session may overwrite the behaviour upon login.

With Plasma 6, there is usually a [Mouse] or [Touchpad] section in ~/.config/kcminputrc that can be tweaked if desired. This is where System Settings stores the mouse/touchpad settings. The following should provide the approximate behaviour you are seeking…

[Touchpad]
TapToClick=false
ClickMethod=buttonareas
MiddleButtonEmulation=false

Any changes made will be applied on next login.

Thanks, deano_ferrari. Yes, I’m using Plasma X11 sessions. I’m OK with going with libinput.

I took your configuration settings and it definitely is getting me a lot closer. I’ll be trying it for a while to see, but at first blush, the random middle clicks seem to be gone.

The biggest thing I have left is that the button area seems to be very thin. Horizontally, the left, middle, and right button work out, but vertically, if I’m not very careful, I’m out of the button area, and my click is recorded as a left click, instead of the middle or right I intended. Is there a way to specify the height of the button area at the bottom?

The possible options for libinput are described in man 4 libinput. The height of that bottom strip is fixed in the libinput code AFAIU. If you find that strip too thin, the only real alternative is to use the Synaptics driver, which allows the button areas to be defined explicitly (via SoftButtonAreas), but it is deprecated and only works in X11 sessions.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.