Keyboard at TC1000 (was Re: HEADSUP: kbdmux(4) is in both HEAD and
RELENG_6)
Milan Obuch
current at dino.sk
Thu Mar 30 12:41:18 UTC 2006
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
controller with four side keys/buttons, somewhat hidden reset key, and a jog
dial (Left, Press, Right). Scan codes produced are as follows:
'Outlook' e0 02 e0 82
'CompaQ' e0 03 e0 83
TAB e0 04 e0 84
ESC e0 05 e0 85
Left e0 06 e0 86
Press 1c 9c
Right e0 07 e0 87
Ctrl-Alt-Del 1d 38 e0 53 9d b8 e0 d3
Detachable USB keyboard (with pointing stick working like USB mouse) works
well. In that situation, using kbdmux is the best solution - even another
keyboard attached via USB works well. Scan codes are another story - with no
other changes, only Press (like Enter) and Ctrl-Alt-Del (like
Ctrl-Alt-Del :) ) works. As there is no point using TC1000 with no (either
detachable or standard) USB keyboard, I think the best way is modify kbdmux.c
to recognize TC1000's non standard scan codes. I used this patch:
--- kbdmux.c.orig Sat Mar 4 01:08:20 2006
+++ kbdmux.c.patched Mon Mar 27 00:11:33 2006
@@ -697,6 +697,24 @@
case 0xE0: /* 0xE0 prefix */
state->ks_prefix = 0;
switch (keycode) {
+ case 0x02: /* TC1000 'Outlook' key */
+ devctl_notify("TC1000","Outlook",scancode & 0x80 ?
"RELEASE" : "MAKE",NULL);
+ goto next_code;
+ case 0x03: /* TC1000 'CompaQ' key */
+ devctl_notify("TC1000","CompaQ",scancode & 0x80 ?
"RELEASE" : "MAKE",NULL);
+ goto next_code;
+ case 0x04: /* TC1000 Tab key */
+ keycode = 0x0F;
+ break;
+ case 0x05: /* TC1000 Esc key */
+ keycode = 0x01;
+ break;
+ case 0x06: /* TC1000 Left key */
+ keycode = 0x61;
+ break;
+ case 0x07: /* TC1000 Right key */
+ keycode = 0x62;
+ break;
case 0x1C: /* right enter key */
keycode = 0x59;
break;
(please unwrap what's necessary, use tabs instead of spaces where applicable).
I would like to get this into source tree - at least Maxim has no objections,
however, maybe making this patch an option would be good, too, but I have no
idea now, how to do it, exactly.
As both 'Outlook' and 'CompaQ' keys start an application under Windows, I
decided to send a notification from kernel, so a user level script could be
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
with this patch one can create both console text-mode and X configuration.
Regards,
Milan
--
Please reply to the mailing list only.
This address is filtered.
More information about the freebsd-current
mailing list