Hooking a Sun Keyboard up to a PC

First of all, find someone that sells NCD X terminals. Ask to buy a Sun layout keyboard with a PS/2 connector.

Unfortunately, this keyboard only supports the newer, cruft free AT set 3 PS/2 protocol, and not the common AT set 2 protocol. The AT set 2 protocol sends characters so as not to confuse old BIOSes and programs written for XT keyboards (eg, the original PC keyboard had no pause key, to pause you pressed ctrl+numlock. Keyboards today are still sending the pause key as four key sequences - ctrl down, numlock down, numlock up, ctrl up).

Thankfully it mostly works. You may not be able to use your BIOS setup utility with it (there is no way of pressing delete!), so keep a standard keyboard around for that.

With the standard keymap, it may be of use to know:

This tar file contains a keymap file that will work with kbd or console-tools, and an init script to run "setscancodes" to set up the linux scan code map. Note: some versions of console-tools have a bug, and you may need to change the line

/usr/bin/setkeycodes $scan $key

to

/usr/bin/setkeycodes $scan $key junk junk

in /etc/init.d/kb_scancodes. You will also need to add links to /etc/rcS.d/ so that it is run by the system startup code.

this file will let you run under X. Start X and compile it with :

user@host:~$ xkbcomp xkb-linux2.0-ncdsun :0.0

The other way is to use the new Linux input discipline drivers, which will automatically detect that keyboard and work for the better part.


Sam Vilain, sam@vilain.net

Return to home page