Some of the Zenbooks have a rocker-style bottom button and it's impossible to press both buttons at the same time for middle button emulation. We need some other approach here, filing this bug on behalf of the reporter here: https://bugzilla.gnome.org/show_bug.cgi?id=707857 Let's discuss first what should/could do to provide middle button emulation and what Windows does. I'll need an evemu-describe of that device too.
Thanks for creating this bug. Note that this particular rocker-style bottom button can be pressed in the middle, hence the approach taken in https://bugzilla.gnome.org/show_bug.cgi?id=707857
what do you mean you can press it in the middle? the photos I can see are of rather bad quality and it's hard to judge. is this a separate set of buttons or is this just a black line on the touchpad surface? what does evemu-record say when you press the middle of the button?
Yes, it is just a black line in the middle. You can press it anywhere on the complete touchpad, but the lower 1/6th over the full width of the touchpad is that rocker switch. You can also press it down everywhere but not on both sides on the same time. $ sudo evemu-record Available devices: /dev/input/event0: Lid Switch /dev/input/event1: Power Button /dev/input/event2: Sleep Button /dev/input/event3: AT Translated Set 2 keyboard /dev/input/event4: Video Bus /dev/input/event5: ETPS/2 Elantech Touchpad /dev/input/event6: Asus WMI hotkeys /dev/input/event7: HDA Intel PCH Mic /dev/input/event8: HDA Intel PCH Headphone /dev/input/event9: HDA Intel PCH HDMI/DP,pcm=3 /dev/input/event10: USB2.0 HD UVC WebCam
Select the device event number [0-10]: 5 # EVEMU 1.2 # Input device name: "ETPS/2 Elantech Touchpad" # Input device ID: bus 0x11 vendor 0x02 product 0x0e version 0000 # Supported events: # Event type 0 (EV_SYN) # Event code 0 (SYN_REPORT) # Event code 1 (SYN_CONFIG) # Event code 2 (SYN_MT_REPORT) # Event code 3 (SYN_DROPPED) # Event code 4 ((null)) # Event code 5 ((null)) # Event code 6 ((null)) # Event code 7 ((null)) # Event code 8 ((null)) # Event code 9 ((null)) # Event code 10 ((null)) # Event code 11 ((null)) # Event code 12 ((null)) # Event code 13 ((null)) # Event code 14 ((null)) # Event type 1 (EV_KEY) # Event code 272 (BTN_LEFT) # Event code 325 (BTN_TOOL_FINGER) # Event code 330 (BTN_TOUCH) # Event code 333 (BTN_TOOL_DOUBLETAP) # Event code 334 (BTN_TOOL_TRIPLETAP) # Event code 335 (BTN_TOOL_QUADTAP) # Event type 3 (EV_ABS) # Event code 0 (ABS_X) # Value 921 # Min 0 # Max 3260 # Fuzz 0 # Flat 0 # Resolution 32 # Event code 1 (ABS_Y) # Value 541 # Min 0 # Max 2119 # Fuzz 0 # Flat 0 # Resolution 32 # Event code 24 (ABS_PRESSURE) # Value 0 # Min 0 # Max 255 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 28 (ABS_TOOL_WIDTH) # Value 2 # Min 0 # Max 15 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 47 (ABS_MT_SLOT) # Value 0 # Min 0 # Max 4 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 48 (ABS_MT_TOUCH_MAJOR) # Value 0 # Min 0 # Max 2445 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 53 (ABS_MT_POSITION_X) # Value 0 # Min 0 # Max 3260 # Fuzz 0 # Flat 0 # Resolution 32 # Event code 54 (ABS_MT_POSITION_Y) # Value 0 # Min 0 # Max 2119 # Fuzz 0 # Flat 0 # Resolution 32 # Event code 57 (ABS_MT_TRACKING_ID) # Value 0 # Min 0 # Max 65535 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 58 (ABS_MT_PRESSURE) # Value 0 # Min 0 # Max 255 # Fuzz 0 # Flat 0 # Resolution 0 # Properties: # Property type 0 (INPUT_PROP_POINTER) # Property type 2 (INPUT_PROP_BUTTONPAD) N: ETPS/2 Elantech Touchpad I: 0011 0002 000e 0000 P: 05 00 00 00 00 00 00 00 B: 00 0b 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 01 00 00 00 00 00 B: 01 20 e4 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 02 00 00 00 00 00 00 00 00 B: 03 03 00 00 11 00 80 61 06 B: 04 00 00 00 00 00 00 00 00 B: 05 00 00 00 00 00 00 00 00 B: 11 00 00 00 00 00 00 00 00 B: 12 00 00 00 00 00 00 00 00 B: 14 00 00 00 00 00 00 00 00 B: 15 00 00 00 00 00 00 00 00 B: 15 00 00 00 00 00 00 00 00 A: 00 0 3260 0 0 32 A: 01 0 2119 0 0 32 A: 18 0 255 0 0 0 A: 1c 0 15 0 0 0 A: 2f 0 4 0 0 0 A: 30 0 2445 0 0 0 A: 35 0 3260 0 0 32 A: 36 0 2119 0 0 32 A: 39 0 65535 0 0 0 A: 3a 0 255 0 0 0 ################################ # Waiting for events # ################################
ok, this isn't actually a rocker switch, this is a normal clickpad, maybe with two toggles left and right, but still just one button, everything else is software emulated. so this means: we should have middle button emulation available here by pressing both buttons at the same time when in software button mode, and by pressing with three fingers when in clickfinger mode. Is this not working?
That is the thing, pressing them both at the same time is physically impossible. IF you want, I can send you a video of how it works. Would that help?
the touchpad only has one physical button, but two triggers. so while you think it's a rocker switch (and it may be, physically), all the touchpad does is send a button left event. libinput then looks at your finger position and converts that into a left or right button event, but libinput doesn't actually know which side of the rocker was triggered. so if you have both fingers on the touchpad in the button area and one finger in each button area, you should get a middle button event when the software buttons are enabled, regardless of whether you press on the left side or the right side of the touchpad.
OK, thanks. I it however possible to click down where the vertical line is on the touchpad. Note this request is regarding a click-and-hold-and-move with one finger in the button part and the other finger on the general pad part for drawing a selection for e.g. opening multiple tabs in a browser at once. Do you have enough information to go forward on this? If you want I can make a small video, with the example script, on what is exactly intended and cannot be done in another way.
for the archives: Pander's actual device is one of the Asus Zenbook Prime UX31A/UX21A/UX32V, see the gnome bug. I looked at a few pictures, afacit the line is just a line drawn onto the touchpad. there is nothing inherent about the line from a physical point and the touchpad doesn't care where in relation to the line you touch. testing this on my touchpad here with software buttons enabled: middle-button emulation works on software buttons and it works for middle button dragging. click with a finger in both the left and right area simultaneously, then use either finger to move while keeping the other finger to hold the button down. The middle button is not released until the click releases. the same is true for clickfinger, click with three fingers to trigger a middle button click, release two fingers and use the remaining finger to drag. The middle button is not released until the click releases.
"click with a finger in both the left and right area simultaneously, then use either finger to move while keeping the other finger to hold the button down." will not work. I will send you an email with a link to a movie where I demonstrate this.
Thanks for the video, summary: this is a normal clickpad and the click behaviour is as expected (and the same as on my laptops here). https://wayland.freedesktop.org/libinput/doc/latest/clickpad_softbuttons.html The important thing: rather than actually clicking with both fingers (which isn't possible because there is only one physical button) you put both fingers on the buttons, then trigger a click with either. As long as the two fingers are in the left and right area, respectively, this should trigger a middle click. I did notice that this is not as reliable as it should be, so this is something we need to fix.
I filed bug 94755 for the middle button emulation issues. Since it looks like the only solution to fix the emulation is to add a middle button, this will also solve the issue listed here.
Thanks. Does this mean the middle button can be added as in my example script so that it exists in between the left and right button? The advantage is that you can use it with your thumb and using your index finger you can make a selection or manipulate an object in another way by sliding on the touchpad. If it is going to be only an emulated on, where you have to touch both the left and right button at the same time, this will be impractical for two reasons. First the touch on the same time is not always synced by the users fingers, posing a risk for unwanted other actions. Secondly, when two fingers need to be used for touching two buttons on the same time, using the touchpad with a third finger is not easy at all. So in general to offer the user the choice, I would recommend these functions regarding third mouse button pressed down for making selections: - none at all - software emulated by pressing left and right simultaneously - software defined in between left and right button (my preference)
(In reply to Pander from comment #13) > Does this mean the middle button can be added as in my example script so > that it exists in between the left and right button? sort-of, the middle button will be hard-coded and you don't need to enable it. but it'll be in the middle, centered on the physical center of the touchpad (by default, unless some touchpads have other markings on it which we'll handle on a case-by-case basis). but yes, it'll be pretty much exactly like you request in comment #0, with the exception that it'll be the new default without configuration.
commit 886b5a2cd8c785e48ddf5ceb4a902cd1f518d2a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 4 10:06:36 2016 +1000 touchpad: add a middle button software area
You can vote here to get it into Ubuntu Yakete https://bugs.launchpad.net/ubuntu/+source/libinput/+bug/1587396
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.