Have you considered a KVM switch? I really like mine. It allows up to four computers leaving me with two extras that sometimes come in handy (plugging in someone else's laptop or sometimes I connect my Raspberry Pi on).
https://www.amazon.com/JideTech-Keyboard-Security-Education-...
FWIW, the first one I got was defective, but the replacement has worked like a champ.