That's one tradeoff in Wayland versus the X Windowing System: if you want a process with the ability to send keystrokes X supports it while under Wayland you'll have to use compositor-specific facilities for every compositor you're willing to support (GNOME, KDE, wlroots, Weston,...).
Yeah. Although X11 is stable and mature and already have every tools we need, apparently Wayland is the new cool thing and we now need to reinvent every wheels (and sometimes for each WMs separately).