Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jul 2004 20:30:39 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        esn@x123.info
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: PS/2 and USB keyboard at the same time, where to start
Message-ID:  <20040718.203039.116906292.imp@bsdimp.com>
In-Reply-To: <20040712142805.wvswgcwoss4g8808@www.x123.info>
References:  <20040710212822.GX41460@seven.alameda.net> <20040710.211039.82990024.imp@bsdimp.com> <20040712142805.wvswgcwoss4g8808@www.x123.info>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040712142805.wvswgcwoss4g8808@www.x123.info>
            "Sebastian Yepes F. [ESN]" <esn@x123.info> writes:
: 
: 
: > In message: <20040710212822.GX41460@seven.alameda.net>
: >             Ulf Zimmermann <ulf@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040718.203039.116906292.imp>