It should work, but I haven't tried. If you try that and it doesn't work, you could add a USB 3.0 switch to switch the USB hub(s) with all the devices besides the mouse an keyboard. With the USB hubs, make sure to get ones with their own power supplies. Also, use the shortest possible and highest quality cables for best connectivity.
I wanted to share an Acer T232HL monitor between my Windows 8.1 Desktop PC and my Surface Pro 2 running Windows 8.1 docked in a Microsoft Surface Dock. I purchased a IOGEAR 2 Port HD display KVM Switch with Audio # GCS62HU. The Desktop displays fine but I get no video signal from the Surface. I have an adaptor from the Mini Display Port of the Includes a 24V/5A power adapter to support PD3.0 charging at up to 60W for laptops and other devices. The Sabrent Thunderbolt 4 KVM Switch (SB-TB4K) is a fast and sleek switchable hub for your laptop and desktop computers. Seamlessly switch between two machines with the push of a button. Output at a high resolution of up to 8K@60Hz for maximum2. Posted April 16, 2022. KVM switches have long since been a major pain in my life. Expensive, oftentimes unreliable and SO. MANY. CABLES. Thunderbolt 4 USB Type-C offers the capability to have display, peripherals and networking via a single cable and many such devices are currently available on the market.I understand the dock is pretty standard and has two DP outputs and a few USB sockets. I would like to be able to use it in my home office with the same type of dock to connect to my new monitor, keyboard and mouse. I would like to use a KVM switch to connect both my new PC and my work Surface Pro (via the dock) to my new monitor, keyboard and YctR7rM.