Universal control is a neat feature on Macintosh computers, allowing you to slide your mouse seamlessly from device to device. Of course you need a relatively recent version of MacOS to make it work, ...
You can share a keyboard and mouse across multiple Windows and macOS computers, if you know the right tools to use.