libinput: Thumb detection based on ABS_MT_WIDTH

Peter Hutterer peter.hutterer at who-t.net
Wed May 17 22:50:52 UTC 2017


On Wed, May 17, 2017 at 11:22:51PM +0200, Friedrich Schöller wrote:
> Dear all, dear Peter,
> 
> As you know, bcm5974 touchpads do not report ABS_MT_PRESSURE, but
> ABS_MT_WIDTH instead. Since libinput does not currently use ABS_MT_WIDTH,
> thumb detection is inaccurate on those devices. When I switched from Mac OS
> to Linux, I stopped using the Magic Trackpad solely for that reason. Now I
> decided it would be time to get my favorite pointing device back. To do
> this, I would like to implement thumb detection based on ABS_MT_WIDTH. Using
> these values has the additional benefit of making thumb detection
> significantly more reliable, since the eccentricity of a thumb can be
> deduced, which is typically much larger than that of a finger.
> 
> Now I am wondering if this would be a welcome addition to libinput. When
> looking through the mailing list I found the patch "touchpad: add touch-size
> based touch handling". This would probably be a good basis to build on. Are
> you still considering committing the patch to git?

tbh, I think ABS_MT_WIDTH is the wrong approach here, at least for the bcms.
I think if you start from that patch series that adds major/minor handling
and get it to work properly, that's the way to go. It'll be apple-only for a
while, so far everything else I've seen so far on these axes is inconsistent
but at least for the bcm5974 it should work - especially given that the
kernel axis was added for those devices..

but yeah, if you want to finish this patchset and get it to work properly,
I'll merge it. I've rebased it to master so it compiles but I haven't tested
it. Available from here, do with it what you think is appropriate :)

https://github.com/whot/libinput/tree/wip/touchpad-apple-touch-major

if you find you cant fix it with major/minor alone and need width as extra
bit of information, that's fine too of course.

Cheers,
   Peter

> 
> Thanks for all your great work.
> 
> Best,
> 
> Friedrich


More information about the wayland-devel mailing list