Dom0 hook for USB keyboard

I’d like to execute xset r rate 300 50 in dom0 when I connect a USB keyboard (to sys-usb, as usual).

Where in dom0 can I look for information that would indicate that a USB keyboard had been attached and which would thus serve as a hook for running the above command?

I’ve tried to think about modifying the existing qubes.InputKeyboard policy but I’m not sure how to have it trigger something in dom0.

1 Like