I have a usb switcher with a button, and then my desktop I have coded up to switch the input on my monitor when the keyboard appears/disappears (udev rules trigger that).