Okay, time to summon DuckDuckFedi.

I have a program that is running on my sway session (so, Wayland, more precisely XWayland).
I use ydotool to run some keystrokes.
Everything works fine as-is, but it means that I can't use the computer for anything else as the keystrokes are sent to the active window.

Do you know if there is a way to create a kind of "virtual keyboard/input device" attached to said application which I could use for the keystrokes? Some kind of containers or something?

Thank you for your ideas! Boosts appreciated!  

#wayland #swaywm #xwayland #ydotool

@ShadowJonathan @Soblow if it's actually an X11 application running in XWayland, then i think you can just use xdotool with the --window parameter? i haven't checked it though..

for wayland apps you could theoretically run another wayland compositor (weston i guess?), configure it to only receive keyboard/mouse events from a certain virtual input source (idk how to do that), emulate that virtual input source, and then run the application inside of that nested wayland compositor by setting the WAYLAND_DESKTOP environment variable

idk if there are any ready-made solutions for this though