Bug 95280

Summary: Middle button not working in X11 the same as with synaptics driver
Product: Wayland Reporter: Marco Arioli <m_arioli>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium CC: benjamin.tissoires, jwrdegoede, m_arioli, peter.hutterer
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Requested attachments
libinput list
evemu record
evemu record 2

Description Marco Arioli 2016-05-05 08:43:47 UTC
I recently switched from synaptics to libinput driver in X11 (xorg 1.18.3). But I lost some features using the touchpad's middle button, it seems to ignore long pressure. Touchpad is AlpsPS/2 ALPS DualPoint TouchPad with 3 buttons.

1) With xv I cannot do the rectangular selection [ref. http://www.trilon.com/xv/manual/xv-3.10a/control-window-5.html - "You can grab an arbitrary region of the screen by clicking the Middle mouse button and dragging a rectangle in exactly the same way you draw a cropping rectangle. When you release the (middle) mouse button, the contents of this rectangle will be read from the screen and loaded into xv. "]

2) I cannot do the "fast" selection-copy with nedit [ref. http://www.doc.ic.ac.uk/lab/labman/nedit/n2.html - The middle mouse button can be used to make an additional selection (called the secondary selection). As soon as the button is released, the contents of this selection will be copied to the insert position of the window where the mouse was last clicked (the destination window).]

And so on.
I don't know whether this is due to an incorrect xorg.conf configuration

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
	Option "Tapping" "on"
EndSection
Comment 1 Marco Arioli 2016-05-05 10:27:17 UTC
Moreover, in nedit no possibility to do this:
"Selected text can also be dragged to a new location in the file using the middle mouse button."

Important: I forgot to write that all features lost with libinput management of touchpad, are still available using a mouse.
Comment 2 Peter Hutterer 2016-05-05 23:14:43 UTC
Attach the output from evemu-describe for this touchpad please. It has three physical buttons, correct?

Also attach the output of sudo libinput-list-devices, thanks.
Comment 3 Marco Arioli 2016-05-09 06:46:32 UTC
Created attachment 123558 [details]
Requested attachments
Comment 4 Marco Arioli 2016-05-09 06:47:20 UTC
Created attachment 123559 [details]
libinput list
Comment 5 Marco Arioli 2016-05-09 06:49:48 UTC
Yes, it has 3 three physical buttons.
Comment 6 Peter Hutterer 2016-05-09 21:50:46 UTC
weird, seems to work fine here. what version of libinput is this, and can you attach an evemu recording of a middle click + pointer move?
Comment 7 Marco Arioli 2016-05-10 06:41:12 UTC
Created attachment 123591 [details]
evemu record

Libinput version is 1.2.902

Attached the recorded events.
When I press only the buttons, evemu records nothing.
Comment 8 Peter Hutterer 2016-05-11 04:58:50 UTC
(In reply to Marco Arioli from comment #7)
> When I press only the buttons, evemu records nothing.

ok, this is a kernel bug then, there are no button events in the log. CC-ing Hans and Benjamin
Comment 9 Benjamin Tissoires 2016-05-11 14:59:10 UTC
Looks like the Latitude E5550 has a trackpoint. Would you mind recording again the event sequence with the trackpoint node, not just the touchpad one?

The 3 buttons on top of the touchpad should be linked to the trackpoint device (the little blue knob), while the 2 below the touchpad should see their event forwarded through the touchpad device.
Comment 10 Marco Arioli 2016-05-11 15:13:47 UTC
Created attachment 123623 [details]
evemu record 2

Seems like you are right.

Another thing that doesn't work really well is the combination CTRL+button with xterm to display toolbar menu.

Left and right buttons work but not always. Middle button never.
Comment 11 Benjamin Tissoires 2016-05-12 08:09:22 UTC
OK, thanks for the confirmation. So it's a libinput bug, and I let Peter decide what to do with that :)
Comment 12 Peter Hutterer 2016-05-12 23:05:02 UTC
ok, to clarify: you're using the trackpoint's button row's middle button, followed by movement of the touchpad. The middle button event is swallowed on long presses.

This is caused by the middle button scrolling enabled by default on your trackpoint. When the middle button is held down, a movement of the trackpoint is converted to scroll events (and the middle button event is swallowed). 
https://wayland.freedesktop.org/libinput/doc/latest/scrolling.html

To disable this, use Option "ScrollMethod" "none" on an xorg.conf snippet that matches *against the AlpsPS/2 ALPS DualPoint Stick device*.

Section "InputClass"
  Identifier "Disable middle button scrolling"
  MatchProduct "AlpsPS/2 ALPS DualPoint Stick"
  MatchDriver "libinput"
  Option "ScrollMethod" "none"
EndSection
Comment 13 Marco Arioli 2016-05-13 07:04:31 UTC
Thank you very much!

I didn't realize that "upper" buttons were connected to trackpoint and not to touchpad.

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.