libinput: Touchpad rotation support

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 10 15:56:17 PST 2016


On Sat, Jan 09, 2016 at 02:32:02PM +0100, Ɓukasz Czuja wrote:
> Hi guys,
> 
> there has been a patch that enables touchpad axis rotation/swap for
> synaptics (for example when you rotate the screen) as seen here
> http://www.helsinki.fi/~rantalai/synaptics/
> 
> Is similar approach possible using libinput/evdev?
> 
> I've succesfully used "Coordinate Transformation Matrix" to do this (swap
> touchpad x/y axis, rotate left). However after that 2 finger vertical
> scrolling (possibly other gestures too) is impacted as it does not follow
> the new CTM coordinate system and works like before (without being rotated
> left - now it should work like horizontal scroll).
> 
> Any ideas? Is this a bug?

scrolling is a separate entity to x/y in libinput, it's posted through a
different interface. The matrix you set is applied in the server, after the
coordinate came out of the driver already and by then it's too late to apply
any matrices, mostly because the information of how the event was generated,
etc. is lost.

I suspect the calibration matrix could be used for that in libinput, and
that should apply to any generated events then too. but touchpads don't have
that calibration matrix available, it's for direct-touch devices only.

so in short: no, it's not possible, but that's mostly by design. I don't
really have any plans to support touchpad rotation at this point, it's very
much a niche use-case that doesn't easily apply to a general desktop
environment. sorry.

Cheers,
   Peter


More information about the wayland-devel mailing list