From owner-freebsd-current@FreeBSD.ORG Sun May 22 19:10:35 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E811B16A41C for ; Sun, 22 May 2005 19:10:35 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF50C43D49 for ; Sun, 22 May 2005 19:10:35 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.190.81]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IGW00AKDNXMS1J9@vms042.mailsrvcs.net> for freebsd-current@freebsd.org; Sun, 22 May 2005 14:10:35 -0500 (CDT) Date: Sun, 22 May 2005 15:08:28 -0400 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <428E7BAF.200@savvis.net> To: Maksim Yevmenkin Message-id: <1116788908.824.23.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port Content-type: text/plain; charset=iso-8859-5 Content-transfer-encoding: 8BIT References: <4288EBEA.5030701@savvis.net> <428A5A58.6010601@savvis.net> <428B7B99.7080206@savvis.net> <428E7BAF.200@savvis.net> Cc: freebsd-current@freebsd.org Subject: Re: keyboard mux driver (straw man proposal & code) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2005 19:10:36 -0000 On Fri, 2005-05-20 at 17:07 -0700, Maksim Yevmenkin wrote: > dear hackers, > > next version of experimental keyboard mux can be downloaded from > > http://www.geocities.com/m_evmenkin/kbdmux-2.tar.gz (~8K) > > also on freefall in my home directory (freefall:~emax/kbdmux-2.tar.gz). > > i gave up idea of using slave keyboards in K_XLATE mode. for whatever > reason i could not get it to work in console (it did work just fine in X). > > so, i re-shaped the code and now kbdmux treats slave keyboards just as > suppliers of raw at scan codes. when keyboard is added to the mux it > will set be switched into K_RAW mode. > > i also decided to not add auxiliary device interface. i think its better > to pass keyboard mux ioctl's through /dev/console. > > i tried the code with one ps/2 keyboard connected to the mux > (pass-through) and it worked for me in both X and console. > > any feedback is welcome! > > thanks, > max > I did jump up and down couple of times ;) and set out to add separate USB numeric keypad to my laptop's keyboard. Here are some observations from that undertaking: I was not able to disconnect original keyboard from the console to add it to the multiplexer: kbdcontrol -K < /dev/console kbdcontrol: unable to obtain keyboard information: Inappropriate ioctl for device I have managed to work around this by using yet another USB keyboard and attaching it to the console using 'kbdcontrol -k /dev/kbd1 < /dev/ttyv0'. After that I was able to add both original keyboard and USB keypad to the multiplexer and attached that to the console. At this point both keyboards provided input to console and X with following side effects: -- keyboard lights (caps lock and num lock) on the main keyboard would not turn on. -- keypad would work in the "arrows" ("up"/"down"/"left"/"right") mode on startup. -- "Caps lock" would capitalize main keyboard (there are no letters on the keypad). -- "Num lock" would switch keypad into numeric mode, but leave main keyboard alone (as it is the case with laptop keyboards it has sprinkling of numerals on the right side overlapping letters). -- Key "5" on the keypad will not produce number "5" in any mode, the rest of the keys ('-', '+', '*', '/', and ) seem to work properly. I am running -CURRENT as of May 14th with console high resolution patch. Machine is Averatec 3150H, keypad is manufactured by iConcepts, but represents itself as CHESEN USB keyboard. If there is any additional information that I can provide or there is something you want me to experiment with, please, let me know. -- Alexandre "Sunny" Kovalenko (Олександр Коваленко)