I've done the same with Lenovo and BENQ monitors with built in KVM, but DDC commands were new to me. I just switched source on the monitor buttons and it would also switch all USB peripherals at the same time.