You could use SimpleKVM to detect the USB change, and trigger the monitor input change.
https://github.com/fiddyschmitt/SimpleKVM