Author: Doug White
Date: 19-12-01 02:59
After a bit of experimentation I've found that you can (ab)use usbd to reset the console keyboard for you.
Insert a block like this into /etc/usbd.conf then kill -HUP usbd:
Device "Keyboard"
devname "ukbd[0-9]+"
attach "/usr/sbin/kbdcontrol -k /dev/kbd1 < /dev/console"
This causes usbd to reset the console keyboard to kbd1, which is usually always the USB keyboard you've just plugged in. If you plug in multiple USB keyboards then you'll have to switch them manually, but I don't exactly find that a common configuration. :) Some creative scripting could improve the intelligence if you regularly use lots of USB keyboards.
When you unplug the keyboard, syscons automatically reverts to kbd0, which will be the atkbd if you've cleared the flags on it.
More information can be found on the usbd.conf(5) man page.
|
|