Wayland client and synthetic input

Olivier Fourdan fourdan at gmail.com
Fri May 16 10:15:34 UTC 2025


Hi Zarif,

On Fri, 16 May 2025 at 11:54, Zarif Atai <z.atai at protonmail.com> wrote:

> Dear subscribers of wayland-devel,
>
> As a Vim motions enthusiast, it bothers me that there are too many
> situations where I'm forced to use a pointer input device (e.g. a mouse) to
> perform an action. I looked around to see if anyone has developed a tool
> that would allow me to move or teleport the pointer to a specific location
> on the screen and perform a click action using keyboard keystrokes. I did
> not find it, so I decided to create it myself. I have recently started to
> learn the programming language Rust. I thought this would be a great
> opportunity to improve my Rust skills, too.
>
> As someone new to both Wayland and Rust, I dove into the Wayland
> documentation and related Rust crates. Thus far, I have not found any
> documentation on how to send synthetic input (i.e. mouse movements) to the
> display server as a Wayland client. According to some LLMs, synthetic input
> is even heavily restricted in Wayland due to security reasons, making my
> quest to create this tool impossible.
>
> I would like to ask for your input (no pun intended) on this. Is it true
> what the LLMs are saying? If so, are there alternative ways to develop such
> a tool?
>

Some would argue that this does not really belong to Wayland (the
protocols), yet that does not mean this is impossible, I would suggest
looking into libei:

https://gitlab.freedesktop.org/libinput/libei

That, however, requires that the Wayland compositor supports the
relevant portal API and libei itself, of course, which is the case of KDE
and GNOME (and possibly others, but I do not know all of the compositors).

HTH

Cheers
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20250516/1ccbedef/attachment-0001.htm>


More information about the wayland-devel mailing list