If you only have two PCs, you only need to run the program on one of them.
When it detects a USB device being plugged in, it changes the monitor input to this computer. When a USB device is removed, it changes the monitor input to the other computer.