Date: Thu, 30 Mar 2006 13:40:32 +0100 From: Milan Obuch <current@dino.sk> To: freebsd-current@freebsd.org Subject: Keyboard at TC1000 (was Re: HEADSUP: kbdmux(4) is in both HEAD and RELENG_6) Message-ID: <200603301440.34672.current@dino.sk> In-Reply-To: <200603101527.07556.current@dino.sk> References: <4408E4E9.1010705@savvis.net> <200603062248.47937.current@dino.sk> <200603101527.07556.current@dino.sk>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603301440.34672.current>