At least in Linux you can disable automatic binding of kernel drivers to devices like so:
echo 0 >/sys/bus/usb/drivers_autoprobe
You can plug in a keyboard and even though the device is recognized and listed in "lsusb", it's not used as a keyboard (or network device, soundcard, scanner, ...) # dmesg
[ 1017.031703] usb 1-10.4: new low-speed USB device number 8 using xhci_hcd
# lsusb -s 1:8
Bus 001 Device 008: ID 046d:c30e Logitech, Inc. UltraX Keyboard (Y-BL49)
I can type on this newly connected keyboard, but no key presses are recorded on the console or on X-windows. My other (also USB) keyboard that had been connected before is still working fine, though.This can even be done with a different mechanism on a per-bus basis as described in https://www.kernel.org/doc/Documentation/usb/authorization.t...
If I decide to use the 2nd keyboard, I'll manually bind this device to the usb hid driver like so:
# echo 1-10.4:1.0 > /sys/bus/usb/drivers/usbhid/bind
(the :1.0 comes from the different functions one single USB device may offer) And from this point on the keyboard works normally.I have no idea why no one bothered to make a nice gui for this feature (which also works on other busses), or why it's not standard to popup some message-box on other OSs (e.g. Windows) whenever something is plugged in a port, before even trying to load any drivers.
(edit: added 2nd part where I manually bind)