[RFC] virtual AT keyboard driver
maksim.yevmenkin at savvis.net
Thu Aug 12 16:23:35 PDT 2004
i finally found some time and cleaned up some code i want to use in for
i need an expert opinion on the following problem.
basically i would like to be able to use things like wireless (bluetooth
in particular) keyboard and mouse. in this case a piece of software
(bluetooth hid daemon) runs on the host and talks to the wireless hid
devices (keyboard, mouse etc.) the daemon receives the input from the
device and passes it to the host.
in the mouse case the input is cursor movements and button events.
currently i'm using syscons(4) (ioctl(2) on /dev/consolectl) to feed
mouse events to the host.
in the keyboard case the input is usb hid reports that i can translate
into AT scan codes. the problem is that i could not find the way to feed
these scan codes to the host. so i wrote a little driver that pretends
to be an AT keyboard, but takes its input (i.e. scan codes) from the
user instead of hardware.
so if there anything wrong with this approach? is there any better
solution? there is still an issue with console being able to accept
input from only from one keyboard. and because of this it is not
possible to use wired keyboard with wireless keypads (or vice versa).
another usage for this might be in a headless (or rather keyboard-less)
please let me know what do you think.
the driver source is at
if you cannot get it, please email me and i will send you a copy.
More information about the freebsd-current