Using a Sun type 5 keyboard on a PC

Sam Vilain (sam@hydro.gen.nz)
Fri, 21 May 1999 00:54:56 +1200 (NZST)


Hi there.

I have recently acquired a Sun type 5 layout keyboard with a PS/2
interface. For those who haven't used a Sun before, they have eleven
extra keys on the left of the keyboard with names such as "Help",
"Paste" and "Stop", and four extra on the top right hand side. This
keyboard actually has 5 more keys (all blank) around the arrow keys.
I have defined the extra keys, and it works for the better part.

However, there are still some problems which will require some kernel
changes to make a couple of the keys work.

The problem is, that this keyboard seems to be cruft-free. Every key
on the keyboard sends a different scan code, and there is no
pause/sysRq/extended/etc nonsense.

This may seem good at first, but the "F9" key and the "F10" key send
scan codes 0x60 and 0x61, respectively. Tack on the release bit, and
that's 0xe0 and 0xe1. Combine this with a keyboard driver expecting
cruft, and you get into a funny state :)

So, it would be good to have a way to disable the scan code <=> key
code translation table and all the extra logic that goes on there, and
let the "loadkeys" system handle it all.

Also, the 5 extra blank keys are quite weird - on one system I tried
them on, "showkeys -s" revealed the keycodes of three of the keys as
0x80, 0x81, and 0x82. The release codes were the same as the depress
codes :). On another system, they returned keycodes of "0xff" -
perhaps better; at least the kayboard controller is noticing the
broken scan codes. The fourth has the same scan code as the keypad
"-" key, and the fifth one seems otherwise normal.

One last thing - the keyboard has four LEDs.

So, I guess my questions are (please cc: me, I'm not on the list):

- can I simply work around the no cruft problem by commenting out
this part of drivers/char/keyboard.c (I am using 2.0.37-pre12)
if (scancode == 0xe0 || scancode == 0xe1) {
prev_scancode = scancode;
return;
}

- Is there anything I could try to get those 5 blank keys to "wake
up"? Perhaps throw the keyboard controller into a different mode
and see what scan codes they generate?

- I would like the fourth LED to be an indication of compose. Is
this possible?

For those interested, the keyboard is an "NCD X-Terminal keyboard,
type 5 Unix", and cost the equivalent of US$80. Talk to your local
NCD store for details. I bought mine from BCL NZ
(http://www.bcl.co.nz). Be warned that all the keys except the main
group have abnormal scan codes.

Thanks,

--
Sam Vilain, sam@whoever.com         work: sam.vilain@unisys.com
http://www.hydro.gen.nz                home: sam@hydro.gen.nz

- 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/