I was looking for something similar where I could easily switch multiple displays between my work Mac that uses a dock and my personal gaming PC. I thought that would be the solution, and it almost was. Unfortunately, it didn't quite work. There were issues with USB on one input (PC) and the display was correctly showing full 4k on the other (Mac). I tried different combinations, different cables, but unfortunately nothing changed. So while I was hoping to find the perfect solution for my specific needs, I expect my search will continue.
NEWCARE HDMI KVM Switch: 4K@60Hz, 2x1 HDMI2.0 Ports + 3X USB KVM Ports - Share 2 Computers on UHD Monitor, with Wireless Keyboard and Mouse Support - USB Disk, Printer, USB Camera Compatible
10 Review
4 Port USB 3.0 Switch Selector - Pubioh KVM Switch for Mouse, Keyboard, Printer, Scanner - 2 in 4 Out Sharing Box with Switch Button and 2 USB 3.0 A to A Cables
11 Review
CKL 4 Port KVM Switch Dual Monitor DisplayPort 4K 60Hz: Unprecedented Multi-Computer Control with Audio, USB 2.0 HUBS, and DP 1.2
11 Review
TESmart 1080P 60Hz USB VGA KVM Extender Over Cat5e Cat6 Ethernet Cable - Long Range 984ft/300m (Sender+Receiver)
10 Review
Fractal Design Define R5 - ATX Mid Tower Computer Case - High Airflow and Silent Optimized - Includes 2x Dynamix GP-14 140mm Silent Fans - Water-Cooling Ready - Black
43 Review
Computer case AeroCool Cylon black
39 Review
MasterBox Q300L Micro-ATX Tower with Magnetic Dust Filter, Acrylic Side Panel, Adjustable I/O & Ventilated Airflow, in Black
40 Review
Computer case be quiet! Pure Base 500 black
32 Review