From: fox@rudolf.nscl.msu.edu (Ron Fox)
Newsgroups: comp.os.vms,comp.sys.dec,comp.unix.ultrix
Subject: Re: Using SUN workstations with VAXen.
Date: 15 Apr 92 15:50:11 GMT
Reply-To: fox@rudolf.nscl.msu.edu (Ron Fox)
Followup-To: 1992Apr13.124858.27726@msuinfo.cl.msu.edu
Organization: National Superconducting Cyclotron Lab.

--
  Many thanks to those who were able to tell me how
to re-map SUN keymaps so that I can get a usable PF keypad when 
logged in to VAXen.  I am still looking for a way to remove the 
missing font warning from the server when things like VUE$MASTER
and dxterm.

Regarding keyboard mapping

 In particular,

Kurt Wampler suggested using the xterm VT-100 terminal emulator
program and using the following resource file additions to re-map
the keyboard:

	
	xterm*VT100.Translations: #override \n\
	       <Key>F3: string(0x1b) string("[A") \n\
	       <Key>F4: string(0x1b) string("[B") \n\
	       <Key>F5: string(0x1b) string("[D") \n\
	       <Key>F6: string(0x1b) string("[C") \n\
	       <Key>F7: string(0x1b) string("OS") \n\
	       <Key>SunF37: string(0x1b) string("Om") \n\
	       <Key>F9: string(0x1b) string("Ol") \n\
	       <Key>R1: string(0x1b) string("[A") \n\
	       <Key>R2: string(0x1b) string("[B") \n\
	       <Key>R3: string(0x1b) string("[D") \n\
	       <Key>Num_Lock: string(0x1b) string("[C") \n\
	       <Key>R4: string(0x1b) string("OP") \n\
	       <Key>R5: string(0x1b) string("OQ") \n\
	       <Key>R6: string(0x1b) string("OR") \n\
	       <Key>KP_Subtract: string(0x1b) string("OS") \n\
	       <Key>R7: string(0x1b) string("Ow") \n\
	       <Key>R8: string(0x1b) string("Ox") \n\
	       <Key>Up: string(0x1b) string("Ox") \n\
	       <Key>R9: string(0x1b) string("Oy") \n\
	       <Key>R10: string(0x1b) string("Ot") \n\
	       <Key>Left: string(0x1b) string("Ot") \n\
	       <Key>R11: string(0x1b) string("Ou")  \n\
	       <Key>R12: string(0x1b) string("Ov") \n\
	       <Key>Right: string(0x1b) string("Ov") \n\
	       <Key>R13: string(0x1b) string("Oq") \n\
	       <Key>R14: string(0x1b) string("Or") \n\
	       <Key>Down: string(0x1b) string("Or") \n\
	       <Key>F35: string(0x1b) string("Os") \n\
	       <Key>KP_0: string(0x1b) string("Op") \n\
	       <Key>KP_Decimal: string(0x1b) string("On") \n\
	       <Key>KP_Enter: string(0x1b) string("OM") \n\
	       <Key>KP_Add: string(0x1b) string("Ol")

Jim Pflugrath suggested using xmodmap to re-map the keyboard for the
entire set of X windows using xmodmap.  His input file follows:

	
	Jim <pflugrath@cshl.org>
	
	! Last modified: 9-Sep-1990
	!
	! Input file for xmodmap.  This file is used to re-map a Sun4 right
keypad
	! into a VT100 style right keypad.
	!
	! See 'man xmodmap' for more details.
	!
	! Usage:  xmodmap this_file
	!
	! Or place following 3 lines into ~/.xinitrc
	!if [ -f $HOME/.xmodmaprc ]; then
	!    xmodmap $HOME/.xmodmaprc		# Install user-defined keyboard
mapping
	!fi
	!
	!
	!        +-------+-------+-------+-------+
	! Keycode|  28   |   29  |  30   |  105  |
	!        |       |       |       |       |
	!  VT100 |  <-   |   ->  |   ,   |Nm_Lock|
	!        +-------+-------+-------+-------+
	!        |  52   |   53  |  54   |   78  |
	!        |       |       |       |       |
	!        |  PF1  |  PF2  |  PF3  |  PF4  |
	!        +-------+-------+-------+-------+
	!        |  75   |   76  |  77   |  132  |
	!        |       |       |       |       |
	!        |   7   |    8  |   9   |   -   |    Shift 8 is Up
	!        +-------+-------+-------+       |    Shift 4 is Left
	!        |  98   |   99  | 100   |       |    Shift 6 is Right
	!        |       |       |       |   ,   |    Shift 2 is Down
	!        |   4   |    5  |   6   |       |
	!        +-------+-------+-------+-------+    To get the Sun4 keys as
labelled
	!        | 119   |  120  | 121   |   97  |    on the keypad be sure
that
	!        |       |       |       |       |    Num_Lock is engaged
(except for
	!        |   1   |    2  |   3   |   E   |    the + key.
	!        +-------+-------+-------+   n   |
	!        |      101      |  57   |   t   |
	!        |               |       |   e   |
	!        |       0       |   .   |   r   |
	!        +---------------+-------+-------+
	!     
	keycode 28 = Left
	keycode	29 = Right
	keycode 30 = KP_Separator comma
	keycode 52 = KP_F1  KP_Equal
	keycode 53 = KP_F2  KP_Divide
	keycode 54 = KP_F3  KP_Multiply
	keycode 78 = KP_F4  KP_Subtract
	!
	! The Sun4 + key is really 2 VT100 keys: , and - so use the Shift
modifier
	! to mimic this.  This means the loss of the normal Sun4 function
	!
	keycode 132 = KP_Separator KP_Subtract KP_Add
	keycode 75 = KP_7
	keycode 76 = KP_8 Up
	keycode 77 = KP_9
	keycode 98 = KP_4 Left
	keycode 99 = KP_5
	keycode 100 = KP_6 Right
	keycode 119 = KP_1
	keycode 120 = KP_2 Down
	keycode 121 = KP_3
	keycode 101 = KP_0
	keycode 57 = KP_Decimal
	keycode 97 = KP_Enter
	

  I chose to go the xterm direction with a few additional resources
to change the window geometry and enlarge the fonts so that they're
readable.   My reasoning here was that that would preserve the 
functionality of the SUN keyboard when I was running windows that are
'SUN' generated.

Ron Fox                     | FOX@MSUNSCL.BITNET      | Where the name 
NSCL                        | FOX@RUDOLF.NSCL.MSU.EDU | goes on before
Michigan State University   | MSUHEP::RUDOLF::FOX     | the quality
East Lansing, MI 48824-1321 |                         | goes in.
USA