Virtual input devices (like Barrier/Synergy) on kwin-wayland

Povilas Kanapickas <[email protected]> Tue, 9 Feb 2021 13:22:33 +0200
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
Hi all,

I would like to work on adding support for virtual input devices to
kwin-wayland. The wayland/X input stack engineer Peter Hutterer has
developed a library called libei [1] that is likely the way forward to
solve this problem on Wayland. There is already a PR to add support of
fake input events (only the submission side, not capturing) on mutter [2].

I've already have a hacky implementation that lets me move mouse and
submit keypresses to kwin-wayland from another machine via Barrier. I've
encountered some architectural difficulties that will need to be solved
when developing a proper solution so I would like to discuss the path
forward.

I would like to ask for opinions on whether KWin maintainers even think
this feature is worthwhile to have from maintenance perspective. If yes,
to me it looks that the first step forward would be to generalize input
submission Device class so that we can add libei virtual input devices.
What do you think about this?

Cheers,
Povilas

[1]: https://gitlab.freedesktop.org/libinput/libei

[2]: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1436