My monitor has a KVM built in...
http://www.dell.com/en-us/work/shop/dell-34-ultrasharp-curve...
It has two USB ports that can go to two different computers, and then in the settings you can set it up so that when you switch from one input to another it also switches what the USB devices are connected to. There are 4 USB ports total on the monitor, and they switch from one device to the other.
It's great, instead of being a separate box, it's built into the monitor. It's neater.