Keyboard at TC1000 (was Re: HEADSUP: kbdmux(4) is in both HEAD and RELENG_6)



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.
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: windows noob needs pointers to writing a device driver
    ... the extra key's scan codes in a sun keyboard are not handled by the keyboard ... if it is a ps2 device, the scan codes bubble up to the RIT. ... >>>work on the windows platform. ... >>>device driver for a usb keyboard. ...
    (microsoft.public.development.device.drivers)
  • Re: windows noob needs pointers to writing a device driver
    ... the extra key's scan codes in a sun keyboard are not handled by the keyboard ... if it is a ps2 device, the scan codes bubble up to the RIT. ... work on the windows platform. ... device driver for a usb keyboard. ...
    (microsoft.public.development.device.drivers)
  • Re: 2.6.35-rc2,3 -- Problem with PS2 keyboard and mouse driver
    ... I compiled 2.6.35-rc3-git7 applying this patch, ... For BIOS and lilo the keyboard works normally. ... Since 2.6.35-rc2 the USB keyboard driver don't work longer, ... static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, ...
    (Linux-Kernel)
  • Re: [linux-usb-devel] Re: serious 2.6 bug in USB subsystem?
    ... > booted and the keyboard is running, ... I tested would crash as soon as they had _any_ USB keyboard plugged ... because even to my USB-untrained eye the patch ... - host gets interrupt, but skips readland hence reads a stale ...
    (Linux-Kernel)
  • Re: [PATCH/RFC?] usb/input: Add support for fn key on Apple PowerBooks
    ... >> Ok, I am looking at the patch again, and I have a question - do we ... That doesn't work for the USB keyboard because the ... Module parameters can be changed using sysfs. ...
    (Linux-Kernel)