From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 28-JUN-1991 19:00:35.40
To:	ARISIA::EVERHART
CC:	
Subj:	re: Where's the GOLD key on XTERM

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.101)
	 id AA10549; Fri, 28 Jun 91 18:53:23 EDT
Received: From BULLDOG.CS.YALE.EDU ([130.132.1.2]) by CRVAX.SRI.COM with TCP; Thu, 27 JUN 91 19:57:53 PDT
Received: from lrw.UUCP by BULLDOG.CS.YALE.EDU via UUCP; Thu, 27 Jun 91 22:53:06 EDT
Message-Id: <9106280253.AA06995@BULLDOG.CS.YALE.EDU>
Received: by lrw.UUCP (DECUS UUCP w/Smail);
          Thu, 27 Jun 91 22:48:49 EDT
Date: Thu, 27 Jun 91 22:48:49 EDT
From: Jerry Leichter <leichter@LRW.COM>
To: INFO-VAX@KL.SRI.COM
Subject: re: Where's the GOLD key on XTERM

	I am accessing some of my VAX applications via XTERM from a Sun
	running Open Windows.  Where the *&^% is the PF1 key (the GOLD key)?
	Where is the rest of the keypad?

	Does anyone have a script to start XTERM to be most ideal for the VAX
	environment?  Where can I define key bindings?

	My basic problems are:

	    Keypad mapping
	    Delete key mapping
	    Scrolling support (its sooo confusing)
    
	I have figured out some of the other neat stuff, like the command to
	invoke at window creation, the -132 flag, etc.

	Also, is XTERM my best choice for what I am trying to do?  I also have
	VT-TOOL, but I think the "mousified"  keypad and cursor keys stink.

XTERM isn't quite a VT100 or VT200 or any other DEC terminal - I forget all
of what it is missing, but I seem to remember that it has no double high or
double wide characters, no graphics characters, and scrolling regions don't
work quite right.  Still, for some things it's a workable approximation.

Similarly, the Sun keyboard isn't an LK201, and it's just not possible to
come up with a completely accurate simulation:  There are no separate arrow
keys, and the editing keypad is close but is not laid out quite the same way.
The final killer is that, at least as of a couple of months ago, Sun had done
something really strange:  The xmodmap program, which allows you to remap
keys, accepts keycodes up to 127 only.  However, in their infinite wisdom,
Sun had chosen to number some of their keys 128 and up.  Those keys cannot be
remapped with xmodmap, unless they've since fixed xmodmap.

Anyhow, enclose below is a set of key mappings that I find useful.  They make
the keypad work reasonably well.  There's no REALLY good place to put the
arrow keys, so I map them twice, once on the top of the left bank of keys,
once somewhere along the top that kind of reminded me of where they used to
be on the VT100.  I'm afraid I can't be more specific - you'll have to try
this out, as I haven't used it in a while, and I didn't comment the file.
(As I recall, xmodmap doesn't provide any way TOO comment the file.)

I don't re-map the delete key, but that's easy to do, too.

To use the enclosed file, just apply xmodmap to it - i.e., xmodmap <file.

Good luck, and if you come up with any improvements please send them along!

							-- Jerry

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

