Bug 94856

Summary: button scrolling for pointing stick cannot be used with middle button emulation
Product: Wayland Reporter: ailin.nemui
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 99845    
Attachments: evemu-describe for pointing stick

Description ailin.nemui 2016-04-07 09:58:36 UTC
My Toshiba laptop comes with a two-button pointing stick (AlpsPS/2 ALPS DualPoint Stick). I am frequently using "middle" button paste shortcut and also like the scrolling emulation that is possible by holding down the middle button and moving the pointing stick. Unfortunately, the Button Scrolling Button does not work with the emulated middle button.

Conversely, if the scroll-emulation is configured on the right button, then the middle mouse emulation also does not work. Furthermore, it is not possible to right-click drag (resizing windows, context-menus in git, etc.)

I had previously discussed this in Bug#39174 for evdev.

It would be nice if the emulated middle button could trigger both middle button and the button scrolling.
Comment 1 Peter Hutterer 2016-04-07 10:59:23 UTC
Please attach an evemu-describe for this device, it'll have the dmi bits we'll need for the udev rule.

Aside from that, I'll need to figure out how exactly we make this work with the middle emulation, e.g. when to release the button, etc. but shouldn't be too bad in libinput.
Comment 2 ailin.nemui 2016-04-07 11:09:08 UTC
Created attachment 122786 [details]
evemu-describe for pointing stick
Comment 3 ailin.nemui 2016-04-07 11:13:46 UTC
From my experience with evdev, I can say that it works well if you use the existing middle mouse emulation to trigger a "down" of the middle button, and the release of all buttons as a "up" and simply pass these emulated events into the button scrolling code
Comment 4 Peter Hutterer 2016-04-11 04:30:26 UTC
4-patch series starting here
https://lists.freedesktop.org/archives/wayland-devel/2016-April/027969.html
Comment 5 ailin.nemui 2016-04-11 15:36:19 UTC
hi, thanks for this patch, nice birthday present :-)

seems to be working fine.

I wish the scrolling could stay enabled after I let go of one of the buttons, though (and only end once both are released).
Comment 6 Peter Hutterer 2016-04-11 21:22:46 UTC
thanks for testing, much appreciated. also, happy birthday ;)

As for the scrolling staying enabled, this will be a bit tricky I think, the way it's hooked up scrolling doesn't know that it is triggered by an emulated button. For now, you'll have to live with the current bhaviour, sorry.
Comment 7 Peter Hutterer 2016-04-14 03:55:17 UTC
commit 1662384b43fcff60270e20ade230dbccc70e78b8
Merge: 8ebe338 115c512
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 14 10:48:41 2016 +1000

    Merge branch 'wip/trackpoint-mb-emu-scrolling'

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.