With swaywm I'm almost multiseating (two people simultaneously using the same computer) with two keyboards, two mice and one GPU with two outputs.
At the start of the sway session, one nested X session is opened with Xephyr querying the localhosts XDMCP server (enabled in lightdm)
In short, these are the commands executed:
swaymsg "input abc:xyz:mouse map_to_output VGA-1"
swaymsg "seat seat1 attach abc:xyz:keyboard"
swaymsg "seat seat1 attach abc:xyz:mouse"
swaymsg "seat seat1 shortcuts_inhibitor enable"
Xephyr -query 127.0.0.1 -glamor -screen 1280x720 -noreset -no-host-grab -name Xephyr1 :1 &
sleep 3
swaymsg "[instance=Xephyr1] move window to output VGA-1"
swaymsg "[instance=Xephyr1] focus"
swaymsg "floating disable"
Xephyr successfully opens a new session, then it's moved to the proper monitor and one of the mice moves only there, and that's it.
Now, how could I capture the keyboard and mouse keypresses from the input devices attached to "seat1" only to that window/container regardless of focus?
Xephyr -keybd/-mouse driver settings don't work at all, neither does -seat.
I know how to multiseat with multiple GPUs and loginctl defining seats, but my goal is to multiseat with one GPU in any recent Linux distribution and not in old, patched ones.