From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM"  3-MAY-1993 09:14:32.96
To:	EVERHART
CC:	
Subj:	RE: Sun, LK201 emulation

Message-Id: <9305021323.AA23895@uu3.psi.com>
Date: Sun,  2 May 93 09:24:12 EDT
From: Jerry Leichter <leichter@lrw.com>
To: INFO-VAX@kl.sri.com
Subject: RE: Sun, LK201 emulation
X-Vms-Mail-To: UUCP%"ANDERSONH@wr-hits.af.mil"

	I have need to connect from several SUN workstations, to our VAXes and
	use various VAX applications such as ALL-IN-1.  The actual connection
	I have been able to make fine.  The problem comes up with keyboard
	emulation.  I have  found no way to make the SUN type 4 keyboard
	emulatate a DEC LK201 keyboard.  Specifically, the GOLD-Key is the
	main problem.  I am using WINS TCP/IP 5.2, and CMU-TEK 6.6 as the
	TCP/IP software on the VAXes. 

I don't know anything about the different "types" of Sun keyboards.  All I can
suggest is the following file, which you feed into xmodmap (assuming you are
running X on your Sun):

keycode 101=KP_0
keycode 119=KP_1
keycode 120=KP_2
keycode 121=KP_3
keycode 98=KP_4
keycode 99=KP_5
keycode 100=KP_6
keycode 75=KP_7
keycode 76=KP_8
keycode 77=KP_9
keycode 52=KP_F1
keycode 53=KP_F2
keycode 54=KP_F3
keycode 57=KP_Decimal
keycode 28=Left
keycode 29=Right
keycode 30=KP_Separator
keycode 105=KP_F4
keycode 78=KP_Subtract
keycode 8=Left
keycode 10=Right
keycode 32=Up
keycode 33=Down
keycode 97=KP_Enter

I don't have a Sun keyboard handy, and haven't used this in quite some time,
so I can't tell you exactly where this places all the various keys.  In some
cases, the placements are a bit arbitrary.  You'll note that I defined some
keys (Left and Right) twice to make them easier to get to.  The Gold key would
be KP_F1, which I put at keycode 52 - whereever that is.

As I recall, one of the idiotic things that Sun did was to define keycodes
greater than 127, but leave xmodmap unable to map any key above 127.  Some of
these assignments are based on that:  Keys that physically should be somewhere
else are defined as they are because the key where they SHOULD be placed has
too high a keycode.  For all I know, this has long been fixed; the above file
dates back about 3 years.

If you come up with a better version, I'd be interested in a copy.

							-- Jerry

