Bug 90204 - Allow switching clickfinger right and middle-click
Summary: Allow switching clickfinger right and middle-click
Status: RESOLVED WONTFIX
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-27 22:04 UTC by Laurentiu Nicola
Modified: 2017-10-22 10:09 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Laurentiu Nicola 2015-04-27 22:04:24 UTC
This is a feature request to allow using a two-finger click as middle click. I know libinput tries to avoid having too many configuration options and I'm not sure how many people have the same issue, but please let me explain.


I have a HP Envy laptop with a touchpad as seen in [1]. Since it has the two clickable buttons but lacks a way to perform a middle-click, I configured the Synaptics drivers to use a two-finger click for that.

I'll also mention that I'm used to holding my hand oriented at 45 degrees or less over the touchpad. I have no idea if other people do the same thing, but it's easier on my wrist. Because of this, holding two fingers over the bottom area requires me to move my palm to a vertical orientation and feels very awkward. It also doesn't seem to work reliably, but that's a different issue altogether [2].

There's also the possibility of using a three-finger click, but it seems unintuitive (to me) and goes against my muscle memory. It also doesn't work for me on Wayland [3].

So, to recap, I think that:

    * left and right-clicks are "free" actions, since they already have touchpad areas for them
    * middle-click is used often enough in browsers (and for pasting the PRIMARY selection if that still works in Wayland) should be reasonably easy to perform; the easiest mapping for it would be a two-finger click

Of course, my argument does not hold for pure clickfinger touchpads (as right-click is probably more important), but on laptops such as mine it would be nice to have two-finger clicks do something useful.

[1] http://www.notebookcheck.net/fileadmin/_migrated/pics/envy17-touchpad.jpg

[2] If holding one finger over the button area and sliding another downwards to the bottom, only the original finger seems to taken into account on a click. Of course, one may argue that doing this is useless because it will also move the cursor.

[3] xinput list only gives me an "xwayland-pointer", which doesn't have any settings for this. Perhaps I'm doing it wrong. On Xorg with xf86-input-libinput the properties are there, but I have other issues [4].

[4] Softbutton right-clicks are detected as left-clicks; it seems specific to xf86-input-libinput, though.

PS: I'm using libinput 0.14.1-1 (or at least that's what my distribution calls it).
Comment 1 Peter Hutterer 2015-04-29 05:36:14 UTC
simple answers first:

(In reply to Laurentiu Nicola from comment #0)
> [2] If holding one finger over the button area and sliding another downwards
> to the bottom, only the original finger seems to taken into account on a
> click. Of course, one may argue that doing this is useless because it will
> also move the cursor.

yeah, that's intentional behaviour. Some touchpads are too small to disallow movement into the button area so we only count fingers as "on the button" if they start in that area.
 
> [3] xinput list only gives me an "xwayland-pointer", which doesn't have any
> settings for this. Perhaps I'm doing it wrong. On Xorg with
> xf86-input-libinput the properties are there, but I have other issues [4].

yeah, xwayland only provides a single pointer device, it doesn't forward the devices 1:1 (because it doesn't have access to the device list, long story).

> [4] Softbutton right-clicks are detected as left-clicks; it seems specific
> to xf86-input-libinput, though.

most likely a recent GNOME issue that defaults to clickfinger behaviour. Try
gsettings set org.gnome.desktop.peripherals.touchpad click-method 'areas'


longer answer regarding your feature request:
I don't have any plans of providing this remapping through a configuration option, simply because long-term it is not maintainable. any one of these configuration options doesn't hurt and can be justified easily, it's the combination of all of them that land us in a mess. It becomes un-testable and unpredictable in some cases too.

we have two methods at the moment for triggering the middle button on touchpad devices: either by pressing left + right together (which works for both software buttons and physical buttons) or if you are in clickfinger mode with the three-finger click. three finger-click obviously because it's the least-common one of the left/right/middle click options.

if we start mixing software buttons and clickfinger we run into a couple of situations where it's not clear what we should do or where the event we produce becomes unpredictable for the user. That's not something we want. And that's even aside from the issue of now having a combinatorial explosion of test-cases.

so summary - no, we won't implement this, sorry.
Comment 2 andykluger 2016-10-17 16:46:54 UTC
I'm just going on the record here to agree that on both of my daily machines, I have hardware lef- and right-click and no hardware for middle-click, and the three finger tap is unreliable, uncomfortable, and difficult to trigger correctly just as OP described (at best -- on one it's currently impossible), and I sincerely hope it becomes possible to assign one of the hardware clickers to middle click.
Comment 3 Laurentiu Nicola 2016-10-17 16:54:58 UTC
I actually thought this got implemented [1], but it looks like it's only for taps.

My previous laptop died and my current one doesn't allow me to configure the middle-click combination even in Windows [2], so it looks like the gap between Windows and Linux keeps decreasing on this front :-(.


[1] https://lists.freedesktop.org/archives/wayland-devel/2016-September/031054.html
[2] I don't think I can run Linux on it yet because of various driver issues.
Comment 4 Peter Hutterer 2016-10-17 23:58:17 UTC
(In reply to andykluger from comment #2)
> I'm just going on the record here to agree that on both of my daily
> machines, I have hardware lef- and right-click and no hardware for
> middle-click, and the three finger tap is unreliable, uncomfortable, and
> difficult to trigger correctly just as OP described (at best -- on one it's
> currently impossible), and I sincerely hope it becomes possible to assign
> one of the hardware clickers to middle click.

middle click emulation should already work, you can press left+right simultaneously to get a middle click.
Comment 5 Laurentiu Nicola 2016-10-18 04:55:16 UTC
(In reply to Peter Hutterer from comment #4)
> middle click emulation should already work, you can press left+right
> simultaneously to get a middle click.

Note that on my original hardware it was physically impossible to press both buttons at the same time.
Comment 6 Peter Hutterer 2016-10-18 05:04:07 UTC
oh, so you have a clickpad then? i.e. you don't have physical buttons, the whole surface of the touchpad is a button? do I remember this right? in that case, yes, you won't get middle button emulation but you can use software button areas that give you a dedicated middle button.

https://wayland.freedesktop.org/libinput/doc/latest/clickpad_softbuttons.html
Comment 7 Laurentiu Nicola 2016-10-18 05:17:47 UTC
(In reply to Peter Hutterer from comment #6)
> oh, so you have a clickpad then? i.e. you don't have physical buttons, the
> whole surface of the touchpad is a button? do I remember this right? in that
> case, yes, you won't get middle button emulation but you can use software
> button areas that give you a dedicated middle button.
> 
> https://wayland.freedesktop.org/libinput/doc/latest/clickpad_softbuttons.html

No, it was a bit weirder. It was a clickpad in that there were no visible buttons and you could click it anywhere, but the bottom part had two hidden buttons with a kind of lever between them (I think). With the Synaptics drivers I could use the hidden buttons for left and right clicks and a two-finger click for middle-click.

My new touchpad is more like a standard clickpad, with no areas that feel like a button. But anyway, between Linux power management and touchpad drivers not working and the new Acer Windows drivers, I've stopped using the middle click on a touchpad.
Comment 8 Logan 2017-10-22 10:09:16 UTC
I haven't cleary understood all things. But I don't see no clear reason to not support a such basic mapping between finger count and action.

Any driver support that and it's a very basic feature. Why force user base to use three-finger as middle-click while most uses are main, then middle, then contextual ...

Such non-supported features is I think why Linux will never have huge user base. User experience seems to never be the priority ...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.