New Hardware Hack for HP 2501 A

Paul Barton-Davis (pbd@Op.Net)
Tue, 22 Dec 1998 09:22:38 -0500


>From: Matthew <matthew@mattshouse.com>
>
>I recently bought a computer that had an HP SK-2501-A keyboard
>(picture at http://www.mattshouse.com/images/2501.jpg). This keyboard
>has 13 additional keys built into the case. They are labeled according
>to their mappings under NT 4. I hacked drivers/char/keyboard.c and
>added/modified the following code in order to enable these keys. A
>co-worker suggested that I post my changes here for possible inclusion
>in the kernel releases.

PLEASE, PLEASE, PLEASE don't do this. There are two reasons.

First of all, setkeycodes(1) means that no kernel hack is required to get
these keys to work.

Second, your HP keyboard is not the only such keyboard to have extra
keys (my logitech has 18 extra keys), and coding up stuff in
keyboard.h that in any way looks keyboard specific is, IMHO, a BAD
idea. The existing stuff in there from the Focus keyboard is a
pain-in-the-ass backwards-don't-upset-the-users hangover, and quite
unnecessary, as a comment in the code states quite clearly.

What *is* necessary is code in X to support the keys, because
currently, Xfree86 only looks for translated scancodes up to 0x6f
(111). The ASSUME_CUSTOM_KEYCODES stuff that Guido (???) added is nice
(and scans the entire 127 keycodes that the kernel uses), but it
doesn't work for prefixed scancodes.

I have a patch against Xfree86-3.3.3 that I intend to post in the next
few days (probably post Xmas). I also have one planned to support the
4 button Logitech Trackman.

--regards,
--p

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/