- 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.
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.