(?xinput?) Multiple mouse pointers, driven by a single physical mouse?

James Harvey jamespharvey20 at gmail.com
Fri Mar 26 14:46:03 UTC 2021


I have multiple windows that are GUI remote desktops to different
machines.  In my case, they are spice clients connected to different
virtual machines.  Each window is the same size.  Each virtual
machine's resolution is the same, and their layout is identical.  I'd
like to use my single physical mouse to click on one of these windows,
and have the input be duplicated to all the other windows I've
selected for this.

I saw xinput can be used to go in the other direction, where there are
multiple physical mice, and it's desired for each of them to have
their own mouse pointer.

I was able to create a new pair of master devices using "xinput
--create-master duplicateA", which is great because although not
critical, I'd like to duplicate the keyboard mouse input also.

It appears a slave pointer can only be attached to a single master
pointer.  The only way I can see to attach a slave pointer to the new
duplicateA master pointer is the "--reattach" command, which of course
detaches it from the original virtual core pointer.

I'm hoping allowing a single slave pointer to be attached
simultaneously to multiple master pointers might be something xorg
would be interested in adding to xinput.  I'm hoping I'm missing an
existing way to do this, but am not seeing it.

There would of course have to be a way to specify the initial
coordinates of the duplicate pointer, or to move it once created, to
work with the layout the user made for the multiple windows.  And,
something would have to be done to maintain the spacing between
pointers, so if a user tried going off screen, the spacing wasn't
permanently changed.  Or, there would just need to be a way for the
user to set all their coordinates again.

(I know my other avenue is to look at having a spice client modified,
so the local machine itself only receives input from the
mouse/keyboard a single time, and sends that input to multiple spice
servers.)


More information about the xorg mailing list