From owner-freebsd-current@FreeBSD.ORG Thu Mar 30 12:41:17 2006 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 CB4F016A401 for ; Thu, 30 Mar 2006 12:41:17 +0000 (UTC) (envelope-from current@dino.sk) Received: from bsd.dino.sk (bsd.dino.sk [213.215.72.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCE6E43D4C for ; Thu, 30 Mar 2006 12:41:16 +0000 (GMT) (envelope-from current@dino.sk) Received: from lex ([213.215.74.194]) (AUTH: PLAIN milan, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by bsd.dino.sk with esmtp; Thu, 30 Mar 2006 14:41:19 +0200 id 00000549.442BD1EF.00011DF8 From: Milan Obuch To: freebsd-current@freebsd.org Date: Thu, 30 Mar 2006 13:40:32 +0100 User-Agent: KMail/1.8.3 References: <4408E4E9.1010705@savvis.net> <200603062248.47937.current@dino.sk> <200603101527.07556.current@dino.sk> In-Reply-To: <200603101527.07556.current@dino.sk> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603301440.34672.current@dino.sk> Subject: Keyboard at TC1000 (was Re: HEADSUP: kbdmux(4) is in both HEAD and RELENG_6) 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: Thu, 30 Mar 2006 12:41:18 -0000 On Friday 10 March 2006 15:27, Milan Obuch wrote: > On Monday 06 March 2006 22:48, Milan Obuch wrote: > > On Saturday 04 March 2006 01:52, Maksim Yevmenkin wrote: > > > kbdmux(4) is now fully integrated into HEAD and RELENG_6. > > > > ... it works on my TabletPC TC1000. Many thanks, I think this is a must > > for every notebook/similar device user. > TC1000 has two keyboards - technically. There is standard AT keyboard=20 controller with four side keys/buttons, somewhat hidden reset key, and a jo= g=20 dial (Left, Press, Right). Scan codes produced are as follows: 'Outlook' =9A =9A =9A e0 02 =9A =9A =9A =9A =9A e0 82 'CompaQ' =9A =9A =9A =9Ae0 03 =9A =9A =9A =9A =9A e0 83 TAB =9A =9A =9A =9A =9A =9A e0 04 =9A =9A =9A =9A =9A e0 84 ESC =9A =9A =9A =9A =9A =9A e0 05 =9A =9A =9A =9A =9A e0 85 Left =9A =9A =9A =9A =9A =9Ae0 06 =9A =9A =9A =9A =9A e0 86 Press =9A =9A =9A =9A =9A 1c =9A =9A =9A =9A =9A =9A =9A9c Right =9A =9A =9A =9A =9A e0 07 =9A =9A =9A =9A =9A e0 87 Ctrl-Alt-Del =9A =9A1d 38 e0 53 =9A =9A 9d b8 e0 d3 Detachable USB keyboard (with pointing stick working like USB mouse) works= =20 well. In that situation, using kbdmux is the best solution - even another=20 keyboard attached via USB works well. Scan codes are another story - with n= o=20 other changes, only Press (like Enter) and Ctrl-Alt-Del (like=20 Ctrl-Alt-Del :) ) works. As there is no point using TC1000 with no (either= =20 detachable or standard) USB keyboard, I think the best way is modify kbdmux= =2Ec=20 to recognize TC1000's non standard scan codes. I used this patch: =2D-- kbdmux.c.orig =9A =9A =9A Sat Mar =9A4 01:08:20 2006 +++ kbdmux.c.patched =9A =9AMon Mar 27 00:11:33 2006 @@ -697,6 +697,24 @@ =9A =9A =9A =9A case 0xE0: =9A =9A =9A/* 0xE0 prefix */ =9A =9A =9A =9A =9A =9A =9A =9A state->ks_prefix =3D 0; =9A =9A =9A =9A =9A =9A =9A =9A switch (keycode) { + =9A =9A =9A =9A =9A =9A =9A case 0x02: =9A =9A =9A/* TC1000 'Outlook' key= */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A devctl_notify("TC1000","Outlo= ok",scancode & 0x80 ?=20 "RELEASE" : "MAKE",NULL); + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A goto next_code; + =9A =9A =9A =9A =9A =9A =9A case 0x03: =9A =9A =9A/* TC1000 'CompaQ' key = */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A devctl_notify("TC1000","Compa= Q",scancode & 0x80 ?=20 "RELEASE" : "MAKE",NULL); + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A goto next_code; + =9A =9A =9A =9A =9A =9A =9A case 0x04: =9A =9A =9A/* TC1000 Tab key */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A keycode =3D 0x0F; + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; + =9A =9A =9A =9A =9A =9A =9A case 0x05: =9A =9A =9A/* TC1000 Esc key */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A keycode =3D 0x01; + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; + =9A =9A =9A =9A =9A =9A =9A case 0x06: =9A =9A =9A/* TC1000 Left key */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A keycode =3D 0x61; + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; + =9A =9A =9A =9A =9A =9A =9A case 0x07: =9A =9A =9A/* TC1000 Right key */ + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A keycode =3D 0x62; + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; =9A =9A =9A =9A =9A =9A =9A =9A case 0x1C: =9A =9A =9A/* right enter key */ =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A keycode =3D 0x59; =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; (please unwrap what's necessary, use tabs instead of spaces where applicabl= e). I would like to get this into source tree - at least Maxim has no objection= s,=20 however, maybe making this patch an option would be good, too, but I have n= o=20 idea now, how to do it, exactly. As both 'Outlook' and 'CompaQ' keys start an application under Windows, I=20 decided to send a notification from kernel, so a user level script could be= =20 fired. Relevant dev.conf lines could be notify 0 { match "system" "TC1000"; action "/root/test $subsystem $type"; }; Today I discovered a way to go with those kays undex X and verified it, so= =20 with this patch one can create both console text-mode and X configuration. Regards, Milan =2D-=20 Please reply to the mailing list only. This address is filtered.