PS/2 and USB keyboard at the same time, where to start

M. Warner Losh imp at bsdimp.com
Sun Jul 18 19:32:20 PDT 2004


In message: <20040712142805.wvswgcwoss4g8808 at www.x123.info>
            "Sebastian Yepes F. [ESN]" <esn at x123.info> writes:
: 
: 
: > In message: <20040710212822.GX41460 at seven.alameda.net>
: >             Ulf Zimmermann <ulf at Alameda.net> writes:
: > : I want to try myself on kernel hacking again and a thing which peaked my
: > : interest was some emails a few days ago about making the kernel use both
: > : PS/2 and USB keyboards at the same time. My questions is can anyone point
: > : me at the relevant pieces of the kernel I should study about trying myself
: > : on this?
: >
: > There's already a keyboard mux in the kernel.  You'll just need to
: > make it max many to 1.
: >
: > Warner
: 
: How is this setup, I don't see no MUX stuff on the files device.hints or kern
: conf.
: 
: can you please explain your self, thanks

Sure.  Sorry this has taken so long, but I've had too much chaos in my
life lately.  That has calmed down now, so I can answer...

Look at src/sys/dev/kbd/kbd.c.  this is the file that implements
/dev/kbd*.  The idea that has been kicked around would be to write a
keymux keyboard_t driver.  It would collect all the other kbd's and
present one logical keyboard.  It wouldn't be that hard to get that to
work...  The harder part might be making it attach before atkbd and/or
ukbd, but even that might not be too horrible if it was reserved.  If
someone wants a specific keyboard, they can still do the kbdcontrol to
get that specific keyboard.

It is also desirable to be able to create keyboard groups, so keep an
eye towards that, but if that is a big pita, don't worry about it.

Warner



More information about the freebsd-hackers mailing list