Wayland: Support calibration matrix over dbus
I've been working on a calibration GUI for libinput tablets over here. Libinput doesn't give you that much to work with, but you can cover about 99% of use cases of tablet configuration with just tunable calibration.
KWin currently doesn't expose calibration tuning on '/org/kde/KWin/InputDevice/' devices in dbus via any properties and thus you can't modify it.
KWin::LibInput::Device does have the notion of orientation but it likewise isn't exposed for outside tuning. Its richer information, especially if a device is paired to a screen and you can track its orientation. But there is no such functionality either to map a device to a specific screen the way
Tangential but the only missing piece besides those is button mapping. libinput pad buttons on tablets have no semantic meaning and are presently just caught in the tabletInputFilter and do nothing. Some means to assign these buttons would also be useful either in the InputDevice interface or elsewhere, since it is largely outside the scope of libinput itself. My present approach would be to install an inputEventFilter on the pad and present users with the ability to map actions to buttons. Problem is that
libinput_device_tablet_pad_get_num_buttons also isn't exposed in
KWin::LibInput::Device so theres no way to know how many buttons to map until they are all pressed and events are intecepted on them.
There is a possibility to overload
supportedButtons on InputDevice to expose the number of buttons found on tablet pads and tools. Presently only pointer devices use this property.
I'm looking to write patches - this all is more an inquiry of what functionality should be implemented. The absolute minimum functionality to configure a tablet would be exposing calibrationMatrix and tabletPadNumButtons via InputDevice but exposing some concept of a direct screen mapping would be big for tracking displays (in both position and orientation) and would be useful to touchscreens where the implicit mapping doesn't always work when devices report bad physical sizes.