From:	SMTP%"wws@cc.bellcore.com"  9-JUN-1994 17:56:10.56
To:	EVERHART
CC:	
Subj:	Re: Solaris to Vax via Xterm

X-Newsgroups: comp.os.vms
Subject: Re: Solaris to Vax via Xterm
Message-ID: <Cr4uqr.4zt@walter.bellcore.com>
From: wws@sorcerer.scp.bellcore.com (Wayne Scott)
Date: Thu, 9 Jun 1994 13:56:51 GMT
Reply-To: wws@cc.bellcore.com
Sender: news@walter.bellcore.com
Organization: Bellcore
Nntp-Posting-Host: 128.96.142.104
X-Newsreader: mxrn 6.18-6
Lines: 147
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET


In article <2t5369$gse@lorne.stir.ac.uk>, kmaguire@qub.ac.uk (K Maguire) writes:
|>Hi Everyone
|>
|>I must use a Vax for email purposes here, although I have a Solaris 2.3
|>workstaion on my desk.  I find it irritating in the extreme that the
|>numeric keypad functions which are very handy in mail and edt do not work
|>at all in an xterm.  Can anything be done about this, or is there
|>available a program (terminal type) for the Vax that would properly
|>interpret my keyboard in either an xterm or command-tool window.  (I've
|>also used the Vax from a DecStation and the keypad works fine there in a
|>Decterm so why not an xterm on a Sun??)
|>
|>Failing that, how do I go about changing the mappings so the keypad
|>functions are available to me somewhere (anywhere) on my keyboard.  Maybe
|>the function keys or something?? 
|>
|>Thanx
|>Kevin
|>
|>--
|>Kevin Maguire     	Dept Computer Science
|>Research Fellow		Queen's University of Belfast
|>email: 			k.maguire@qub.ac.uk


I'm transitioning from a DEC/Alpha to a SUN/Solaris box.
I need to access VAX/VMS systems from both.
Anticipating the same problem, I asked about this in the relevant
SUN News Groups.  I received several replies, none of which I've
tried yet because:  1) my SUN isn't configured yet;  2) I still have
the DEC/Alpha.  Anyway, the following reply sounds the most promising
to me, and I'll try it first when the time comes.
If someone else tries it, please let me know how it goes.

Thanks,
Wayne Scott
===========

From clsun1.admdvl.cl.uh.edu!petkovsk Wed May 11 11:10:14 1994
Date: Wed, 11 May 1994 10:11:50 +0600
From: petkovsk@clsun1.admdvl.cl.uh.edu (Leslie S. Petkovsky)
Message-Id: <9405111511.AA06025@clsun1>
To: wws@cc.bellcore.com
Subject: RE:  accessing VAX/VMS with SUN keyboards ?
Cc: petkovsk@clsun1.admdvl.cl.uh.edu
X-Sun-Charset: US-ASCII
Content-Length: 4270

	Here is a mapping I am currently using for a Sun type 5 keyboard
	on a Sun SPARC 10 using Solaris 2.3 to map like a VT220 on the Vax.
	We have been using this mapping	for about 2 weeks and it seems to
	work fine.  The only drawback with this mapping is that the NumLock
	key only sends a PF1 keycode sequence when the key goes from OFF to ON.
	Also, the VAX mapping for the keypad is only active when NumLock
	is ON, otherwise, the keypad sends the alpha-numeric values written
	on the keys (i.e., no arrows, end, etc.)

	The mapping when NumLock is on follows.
    
	Sun Key				VT220 Key equivalent
	-------				--------------------
	Num Lock			PF1
	KP /				PF2
	KP *				PF3
	KP -				PF4
	F4-F12				F6-F14
	Print Screen			Help
	Pause				Do
	Mute Audio			F17
	Lower Audio			F18
	Raise Audio			F19
	Power Switch			F20
	Del				Select
	Insert				Find
	End				Prev Screen
	Home				Insert Here
	Page Down			Next Screen
	Page Up				Remove

	To enable this mapping, I added the following text to my 
	~/app-defaults/XTerm file and use the "-name vax" qualifier
	when issuing the xterm command.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -- - - - - --  - CUT HERE - ------- - - --- - - - - - - - -  - - - -
! Set up keyboard mapping for the VAX keypad. NumLock key toggles between
! normal mapping and keypad mapping.
! VAX PF1 to PF4 correspond to Sun Num_Lock on, KP /, KP *, KP -
vax*VT100.translations: #override  \
        <Key>Num_Lock:			string(0x1b) string("OP") \n\
        @Num_Lock<Key>KP_Divide:	string(0x1b) string("OQ") \n\
        @Num_Lock<Key>KP_Multiply:	string(0x1b) string("OR") \n\
        @Num_Lock<Key>KP_Subtract:	string(0x1b) string("OS") \n\
        @Num_Lock<Key>KP_7:		string(0x1b) string("Ow") \n\
        @Num_Lock<Key>KP_8:		string(0x1b) string("Ox") \n\
        @Num_Lock<Key>KP_9:		string(0x1b) string("Oy") \n\
        @Num_Lock<Key>KP_Add:		string(0x1b) string("Om") \n\
        @Num_Lock<Key>KP_4:		string(0x1b) string("Ot") \n\
        @Num_Lock<Key>KP_5:		string(0x1b) string("Ou") \n\
        @Num_Lock<Key>KP_6:		string(0x1b) string("Ov") \n\
        @Num_Lock<Key>KP_1:		string(0x1b) string("Oq") \n\
        @Num_Lock<Key>KP_2:		string(0x1b) string("Or") \n\
        @Num_Lock<Key>KP_3:		string(0x1b) string("Os") \n\
        @Num_Lock<Key>KP_Enter:		string(0x1b) string("OM") \n\
        @Num_Lock<Key>KP_0:		string(0x1b) string("Op") \n\
        @Num_Lock<Key>KP_Decimal:	string(0x1b) string("On") \n\
	<Key>KP_1:			string(1)\n\
	<Key>KP_2:			string(2)\n\
	<Key>KP_3:			string(3)\n\
	<Key>KP_4:			string(4)\n\
	<Key>KP_5:			string(5)\n\
	<Key>KP_6:			string(6)\n\
	<Key>KP_7:			string(7)\n\
	<Key>KP_8:			string(8)\n\
	<Key>KP_9:			string(9)\n\
	<Key>KP_Decimal:		string(.)\n\
	<Key>KP_0:			string(0)\n\
	<Key>Delete:			string(0x1b) string("[4~")\n\
	<Key>Insert:			string(0x1b) string("[1~")\n\
	<Key>End:			string(0x1b) string("[5~")\n\
	<Key>Home:			string(0x1b) string("[2~")\n\
	<Key>Page_Down:			string(0x1b) string("[6~")\n\
	<Key>Page_Up:			string(0x1b) string("[3~")\n\
	<Key>BackSpace:			string(0x7f)\n\
	<Key>KP_3:			string(3)\n\
	<Key>F4:			string(0x1b) string("[17~")\n\
	<Key>F5:			string(0x1b) string("[18~")\n\
	<Key>F6:			string(0x1b) string("[19~")\n\
	<Key>F7:			string(0x1b) string("[20~")\n\
	<Key>F8:			string(0x1b) string("[21~")\n\
	<Key>F9:			string(0x1b) string("[23~")\n\
	<Key>F10:			string(0x1b) string("[24~")\n\
	<Key>SunF36:			string(0x1b) string("[25~") \n\
	<Key>SunF37:			string(0x1b) string("[26~") \n\
	<Key>Print:			string(0x1b) string("[28~")\n\
	<Key>Pause:			string(0x1b) string("[29~")\n\
	<Key>SunAudioMute: string(0x1b) string("[31~")\n\
	<Key>SunAudioLowerVolume: string(0x1b) string("[32~")\n\
	<Key>SunAudioRaiseVolume: string(0x1b) string("[33~")\n\
	<Key>SunPowerSwitch: string(0x1b) string("[34~")
- - - - - - - - - - - - - - - CUT HERE - - - - - - - - - - - - - -  - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-------------------------------------------------------------------------------
Leslie S. Petkovsky
Senior Systems Analyst/DBA
University of Houston-Clear Lake              petkovsk@clsun1.admdvl.cl.uh.edu
-------------------------------------------------------------------------------