From owner-freebsd-current@FreeBSD.ORG Thu Aug 12 23:23:35 2004 Return-Path: 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 7CF8B16A4CF for ; Thu, 12 Aug 2004 23:23:35 +0000 (GMT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0DFA43D45 for ; Thu, 12 Aug 2004 23:23:34 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.0); Thu, 12 Aug 2004 18:23:35 -0500 Received: from savvis.net ([66.35.239.94]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.0); Thu, 12 Aug 2004 18:23:35 -0500 Message-ID: <411BFBF1.9000905@savvis.net> Date: Thu, 12 Aug 2004 16:23:29 -0700 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031207 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Aug 2004 23:23:35.0590 (UTC) FILETIME=[63E13C60:01C480C3] Subject: [RFC] virtual AT keyboard driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 12 Aug 2004 23:23:35 -0000 Dear Hackers, i finally found some time and cleaned up some code i want to use in for bluetooth hid. i need an expert opinion on the following problem. basically i would like to be able to use things like wireless (bluetooth in particular) keyboard and mouse. in this case a piece of software (bluetooth hid daemon) runs on the host and talks to the wireless hid devices (keyboard, mouse etc.) the daemon receives the input from the device and passes it to the host. in the mouse case the input is cursor movements and button events. currently i'm using syscons(4) (ioctl(2) on /dev/consolectl) to feed mouse events to the host. in the keyboard case the input is usb hid reports that i can translate into AT scan codes. the problem is that i could not find the way to feed these scan codes to the host. so i wrote a little driver that pretends to be an AT keyboard, but takes its input (i.e. scan codes) from the user instead of hardware. so if there anything wrong with this approach? is there any better solution? there is still an issue with console being able to accept input from only from one keyboard. and because of this it is not possible to use wired keyboard with wireless keypads (or vice versa). another usage for this might be in a headless (or rather keyboard-less) system. please let me know what do you think. the driver source is at http://www.geocities.com/m_evmenkin/vkbd.tar.gz (~10K) if you cannot get it, please email me and i will send you a copy. thanks, max