- Most monitors have multiple digital inputs. Connect each computer to one of them
- Use a USB switch keyboard and mouse
- Before switching the USB switch, press the "lock screen" key combination and make sure locking the screen drops the video signal
- After switching the USB switch, pressing shift should bring up the login dialog and re-activate video output. Since the monitor has just lost the signal in the previous step, it will scan the inputs and switch to the desired signal.
Even more ideally, the display would also have a built-in Bluetooth controller that stays active regardless of the USB controller's attach state, such that Bluetooth peripherals could be paired to the display itself rather than to the OS (i.e. you'd manage the pairings through the OSD of the display); and then these devices would be presented through the display's USB controller as always-on direct-attached USB devices — much like VM hypervisors present host-attached Bluetooth HID devices to their VM guests. (As a side-benefit of that, as long as the computer's BIOS understood Thunderbolt well-enough to display anything during boot, then even Bluetooth peripherals would also work during boot.)
I use it to switch all of my peripherals (keyboard, mouse, wireless headset dongle, webcam, and mixer) between my desktop and my MacBook several times per day and have not had a single failure yet.
Wendell at Level1Techs does good work and there's even newer ones that can do 8k30.
[0] https://store.level1techs.com/products/kvm-switch-dual-monit...
https://www.startech.com/Server-Management/KVM-Switches/2-po...
I have AirPods but will only pair them to my phone.
A lot of these things seem to "help" by inserting their own USB host device that acts as a proxy for attached USB peripherals. This allows them to do (ostensibly) useful useful things such as intercepting keypresses and responding to them (e.g. by switching to another input).
Don't get one of those, get a physical switch that just connects the leads to the correct port when pressed. I got this USB 2.0 switch (all you need for input devices) for $12 [0]. I'm sure there are others available with more ports, but this is all I needed.
Though, I also use a KVM to switch over the video but it's separate.
1) Http://pibookpro.com
(I'd guess their newer models work similarly but I haven't confirmed.)
I've used it with Windows 10, MacOS and an RPi, with no issues.
I have a HDMI KVM switch that's supposed to be 4k@60. One PC won't detect it as such; I can make a custom 1440p at 42Hz mode but nothing higher. The other will send 4k/@60, but the monitor will do one of 4 or so failure modes:
* Entire screen compressed to half width: 50% * Correct behaviour: 20% * Correct display, occasionally flipping to black screen: 10% * Gatbled screen: 5% * No synch: 15%
Switching input is a game of toggling back and forth until it synchs correctly.
None of this happens with a direct connection.
The switch also doesn't seem to detect when I set up a keyboard macro for the switch-input sequence (control-control-1/2/3/4) but that's not nearly the dealbreaker.
I'm not sure if it's the switch or the monitor being relatively intolerant of the switch's behaviour, but I don't want to toss around $100-300 on spares to diagnose this.