From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 3 16:46:08 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 E9C4316A41C for ; Fri, 3 Jun 2005 16:46:08 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FF1543D1D for ; Fri, 3 Jun 2005 16:46:08 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id E25BD3BF07; Fri, 3 Jun 2005 11:45:41 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08230-01-13; Fri, 3 Jun 2005 11:45:41 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id ADA763BE25; Fri, 3 Jun 2005 11:45:41 -0500 (CDT) Received: from s228130hz1ew031.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 3 Jun 2005 11:45:36 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew031.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 3 Jun 2005 11:45:25 -0500 Message-ID: <42A0891F.8080800@savvis.net> Date: Fri, 03 Jun 2005 09:45:19 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Norbert Koch References: <000001c5681f$9a5eb4e0$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <000001c5681f$9a5eb4e0$4801a8c0@ws-ew-3.W2KDEMIG> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Jun 2005 16:45:26.0007 (UTC) FILETIME=[A4706870:01C5685B] X-Virus-Scanned: amavisd-new at savvis.net Cc: "Freebsd-Hackers@Freebsd. Org" Subject: Re: using vkbd device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 16:46:09 -0000 Norbert, > I am trying to use vkbd to multiplex > an at keyboard and an usb keyboard > into syscons. ok > Vkbd's control device's write routine > expects ints to queue to the slave device. correct > As I understand, those ints map 1:1 > to the chars I read from a keyboard device, right? yes, the ints should represent AT keyboard scancodes. > So I open, for example, /dev/kbd0, set it to K_RAW, > read chars from it and write them as ints to > vkbd's control device, right? yes, it should work. keep in mind that vkbd(4) emulates only one keyboard and keeps only one state. that is if you feed scancodes from multiple sources into the same vkbd(4) then it will look like one huge keyboard with lots of duplicated keys. so you can press shift/ctrl/alt on one keyboard and actual key on another, but it still will look like you have presses the keys on the same keyboard. you also might want to look at experimental keyboard mux drivers. it is based on vkbd(4) and uses the idea of one super-keyboard that consumes scancodes from other keyboards. there are still a few issues i need to fix, but, in general, it works. http://www.geocities.com/m_evmenkin/kbdmux-2.tar.gz thanks, max