From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 19 02:32:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 869D716A4CE for ; Mon, 19 Jul 2004 02:32:20 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CF3143D62 for ; Mon, 19 Jul 2004 02:32:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i6J2UcDB018734; Sun, 18 Jul 2004 20:30:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 18 Jul 2004 20:30:39 -0600 (MDT) Message-Id: <20040718.203039.116906292.imp@bsdimp.com> To: esn@x123.info From: "M. Warner Losh" 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> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: PS/2 and USB keyboard at the same time, where to start X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2004 02:32:20 -0000 In message: <20040712142805.wvswgcwoss4g8808@www.x123.info> "Sebastian Yepes F. [ESN]" writes: : : : > In message: <20040710212822.GX41460@seven.alameda.net> : > Ulf Zimmermann 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