"   TERMINAL DEFINITION FILE FOR Tektronic Xterminal
"   Terminal is to be using xterm with special .Xdefaults entry

" To run the Tektronic terminal you need to install a resource file
" using xrdb. You may run xrdb on NOS/VE.
"
" NOS/VE Installation
"
" The following is file which is required in order to use this TDU.
" Take it out of this TDU and remove the quote from the beginning of each line
" lines.  It can then be used to run xrdb from the NOS/VE host.
" To allow these key mappings to work, put them in a file on NOS/VE and
"  execute the command:
"             xrdb whatever_filename_you_used
" ------------------ beginning of NOS/VE file _xdefaults ----------------------
"xterm*Font:         -adobe-courier-bold-r-normal--18-180-75-75-m-*
"xterm*Font1:        -adobe-courier-medium-r-normal--8-80-75-75-m-*
"xterm*Font2:        -adobe-courier-bold-r-normal--12-120-75-75-m-*
"xterm*Font3:        -adobe-courier-bold-r-normal--18-180-75-75-m-*
"xterm*Font4:        -adobe-courier-bold-r-normal--24-240-75-75-m-*
"xterm*scrollBar:          on
"xterm*saveLines:          150
"xterm*borderWidth:        2
"xterm*font:               10x20
"xterm*VT100.Geometry: 80x40+0+0
"xterm*Tek4014.fontLarge: -adobe-courier-bold-r-normal--18-180-75-75-m-*
"xterm*Tek4014.fontSmall: -adobe-courier-bold-r-normal--12-120-75-75-m-*
"xterm*Tek4014.translations: #override\
"   <Key>F1: tek-page() \n\
"   <Key>F12: set-visibility(tek,off)
"xterm*VT100.translations: #override\
"   <Key>Tab: string(0x09) string(0x0d) \n\
"   Ctrl<Key>T: string(0x14) \n\
"   Ctrl<Key>F12: set-terminal-type(tek) \n\
"   Shift<Key>Delete: string(0x1b) string([) string(M) \n\
"        <Key>Delete: string(0x1b) string([) string(P) \n\
"   Shift<Key>Insert: string(0x1b) string([) string(L) \n\
"        <Key>Insert: string(0x1b) string([) string(4h) \n\
"   Shift<Key>Home:   string(0x1b) string([) string(2J) \n\
"       <Key>Home:   string(0x1b) string([) string(H) \n\
"  Shift<Key>Prior:  string(0x1b) string([) string(5}) string(0x0d) \n\
"       <Key>Prior:  string(0x1b) string([) string(5~) string(0x0d) \n\
"  Shift<Key>Next:   string(0x1b) string([) string(6}) string(0x0d) \n\
"       <Key>Next:   string(0x1b) string([) string(6~) string(0x0d) \n\
"  Shift<Key>Up:     string(0x1b) string([) string(7~) string(0x0d) \n\
"  Shift<Key>Down:   string(0x1b) string([) string(8~) string(0x0d) \n\
"  Shift<Key>End:    string(0x1b) string([) string(K)  \n\
"       <Key>End:    string(0x1b) string([) string(4l) \n\
"  Shift<Key>F1: string(0x1b) string(O) string(P) string(0x0d) \n\
"  Shift<Key>F2: string(0x1b) string(O) string(Q) string(0x0d) \n\
"  Shift<Key>F3: string(0x1b) string(O) string(R) string(0x0d) \n\
"  Shift<Key>F4: string(0x1b) string(O) string(S) string(0x0d) \n\
"  Shift<Key>F5: string(0x1b) string(O) string(m) string(0x0d) \n\
"  Shift<Key>F6: string(0x1b) string(O) string(l) string(0x0d) \n\
"  Shift<Key>F7: string(0x1b) string(O) string(M) string(0x0d) \n\
"  Shift<Key>F8: string(0x1b) string(O) string(n) string(0x0d) \n\
"  Shift<Key>F9: string(0x1b) string(O) string(p) string(0x0d) \n\
"  Shift<Key>F10: string(0x1b) string($) string(E) string(0x0d) \n\
"  Shift<Key>F11: string(0x1b) string($) string(F) string(0x0d) \n\
"  Shift<Key>F12: string(0x1b) string($) string(G) string(0x0d) \n\
"  <Key>F1: string(0x1b) string(O) string(q) string(0x0d) \n\
"  <Key>F2: string(0x1b) string(O) string(r) string(0x0d) \n\
"  <Key>F3: string(0x1b) string(O) string(s) string(0x0d) \n\
"  <Key>F4: string(0x1b) string(O) string(t) string(0x0d) \n\
"  <Key>F5: string(0x1b) string(O) string(u) string(0x0d) \n\
"  <Key>F6: string(0x1b) string(O) string(v) string(0x0d) \n\
"  <Key>F7: string(0x1b) string(O) string(w) string(0x0d) \n\
"  <Key>F8: string(0x1b) string(O) string(x) string(0x0d) \n\
"  <Key>F9: string(0x1b) string(O) string(y) string(0x0d) \n\
"  <Key>F10: string(0x1b) string($) string(A) string(0x0d) \n\
"  <Key>F11: string(0x1b) string($) string(B) string(0x0d) \n\
"  <Key>F12: string(0x1b) string($) string(C) string(0x0d)
" ---------------------- end of NOS/VE file _xdefaults -------------------------

"   Definition of Tektronic X terminal based on VT100

"   VARIABLES
 prefix              = (1B(16) 5B(16))
 clear_home          = (prefix 32(16) 4A(16))
 clear_all_tabs      = (prefix '3g')
 disable_mouse       = (prefix '?1002l')
 enable_mouse        = (prefix '?1002h')
 set_to_40x80        = (prefix 3F(16) 33(16) 6C(16))
 set_to_40x132       = (prefix 3F(16) 33(16) 68(16))
 start_alternate     = (prefix 31(16) 6D(16))
 start_inverse       = (prefix '7' 6D(16))
 start_underline     = (prefix 34(16) 6D(16))
 normal_attributes   = (prefix 'm')
 stop_alternate      = normal_attributes
 stop_inverse        = normal_attributes
 stop_underline      = normal_attributes

"   MODEL NAME AND COMMUNICATION TYPE                                         "
 model_name          value = 'TEKX_40_80'
 communications      type  = asynch
 application_string name = 'vt100_scrolling' out = 'true'

"   END OF INFORMATION SPECIFICATION                                          "
 end_of_information  in    = (0)

 "   CURSOR POSITIONING INFORMATION                                            "
 cursor_pos_encoding      bias  = (1)   type = ansi_cursor
 cursor_pos_column_first  value = FALSE
 cursor_pos_column_length value = (0)
 cursor_pos_row_length    value = (0)
 cursor_pos_begin         out   = (prefix)
 cursor_pos_second        out   = (3B(16))
 cursor_pos_third         out   = (48(16))

"   CURSOR MOVEMENT INFORMATION                                               "
 cursor_home              inout = (prefix 48(16))  label='HOME'
 cursor_up                inout = (prefix 41(16))
 cursor_down              inout = (prefix 42(16))
 cursor_left              inout = (prefix 44(16))
 cursor_right             inout = (prefix 43(16))

"   CURSOR BEHAVIOR (for cursor movement keys)                                "
 move_past_right          type  = stop_next
 move_past_left           type  = stop_next
 move_past_top            type  = stop_next
 move_past_bottom         type  = stop_next

"   CURSOR BEHAVIOR (for character keys)                                      "
 char_past_right          type  = stop_next
 char_past_left           type  = stop_next
 char_past_last_position  type  = stop_next

"   TERMINAL ATTRIBUTES                                                       "
 clears_when_change_size  value = TRUE
 function_key_leaves_mark value = 1
 has_hidden               value = FALSE
 has_protect              value = FALSE
 home_at_top              value = TRUE
 multiple_sizes           value = TRUE
 tabs_to_home             value = FALSE
 tabs_to_tab_stops        value = TRUE
 tabs_to_unprotected      value = FALSE

"   SCREEN SIZES
 set_size       rows = 40 columns = 80   out = (set_to_40x80)
 set_size       rows = 40 columns = 132  out = (set_to_40x132)

"   SCREEN AND LINE MODE TRANSITION
 set_screen_mode     out = (1B(16) 3C(16) clear_all_tabs ..
      1B(16) 28(16) 42(16) 1B(16) 29(16) 30(16) 0F(16) 1B(16) ..
      3D(16) enable_mouse prefix '?7;1l' )

 set_line_mode       out = (1B(16) 3C(16) clear_all_tabs ..
      1B(16) 28(16) 42(16) 1B(16) 29(16) 30(16) 0F(16) 1B(16) ..
      3E(16) disable_mouse prefix '?7;1h' )

"   TERMINAL CAPABILITIES
 delete_char         in    = (prefix 50(16))         label='Delete'
 delete_line_bol     in    = (prefix 4D(16))         label='Shift-Delete'
 erase_end_of_line   inout = (prefix 4B(16))         label='Clr_EOL'
 erase_line_stay     inout = (prefix 32(16) 4B(16))
 erase_page_home     inout = (clear_home)            label='Clear_P'
 insert_line_bol     in    = (prefix 4C(16))         label='Shift-Insert'
 insert_mode_begin   in    = (prefix 34(16) 68(16))  label='Insert'
 insert_mode_end     inout = (prefix 34(16) 6C(16))  label='End'
 tab_forward         inout = (09(16))
 tab_clear_all       inout = (clear_all_tabs)
 tab_set             inout = (1B(16) 48(16))

"   MISCELLANEOUS TERMINAL SEQUENCES
 bell_nak            out = (bel)
 backspace           in = bs

"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION
 f1        in = (1B(16) 4F(16) 71(16)) label='F1'
 f2        in = (1B(16) 4F(16) 72(16)) label='F2'
 f3        in = (1B(16) 4F(16) 73(16)) label='F3'
 f4        in = (1B(16) 4F(16) 74(16)) label='F4'
 f5        in = (1B(16) 4F(16) 75(16)) label='F5'
 f6        in = (1B(16) 4F(16) 76(16)) label='F6'
 f7        in = (1B(16) 4F(16) 77(16)) label='F7'
 f8        in = (1B(16) 4F(16) 78(16)) label='F8'
 f9        in = (1B(16) 4F(16) 79(16)) label='F9'
 f10       in = (1B(16) 24(16) 41(16)) label='10'
 f11       in = (1B(16) 24(16) 42(16)) label='11'
 f12       in = (1B(16) 24(16) 43(16)) label='12'
 f13       in = ()
 f14       in = ()
 f15       in = ()
 f16       in = ()
 f1_s      in = (1B(16) 4F(16) 50(16)) label='S1'
 f2_s      in = (1B(16) 4F(16) 51(16)) label='S2'
 f3_s      in = (1B(16) 4F(16) 52(16)) label='S3'
 f4_s      in = (1B(16) 4F(16) 53(16)) label='S4'
 f5_s      in = (1B(16) 4F(16) 6D(16)) label='S5'
 f6_s      in = (1B(16) 4F(16) 6C(16)) label='S6'
 f7_s      in = (1B(16) 4F(16) 4D(16)) label='S7'
 f8_s      in = (1B(16) 4F(16) 6E(16)) label='S8'
 f9_s      in = (1B(16) 4F(16) 70(16)) label='S9'
 f10_s     in = (1B(16) 24(16) 45(16)) label='10'
 f11_s     in = (1B(16) 24(16) 46(16)) label='11'
 f12_s     in = (1B(16) 24(16) 47(16)) label='12'
 f13_s     in = ()
 f14_s     in = ()
 f15_s     in = ()
 f16_s     in = ()

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION
 next      in = 13            label = 'RETURN'
 next_s    in = ()
 bkw       in = (1B(16) 5B(16) 35(16) 7E(16)) label='BKW'
 fwd       in = (1B(16) 5B(16) 36(16) 7E(16)) label='FWD'
 back      in = (1B(16) 4F(16) 73(16)) label='F3'
 help      in = (1B(16) 4F(16) 74(16)) label='F4'
 undo      in = (1B(16) 4F(16) 75(16)) label='F5'
 stop      in = (1B(16) 4F(16) 76(16)) label='F6'
 bkw_s     in = (1B(16) 5B(16) 35(16) 7D(16)) label='Shift-BKW'
 fwd_s     in = (1B(16) 5B(16) 36(16) 7D(16)) label='Shift-FWD'
 undo_s    in = (1B(16) 4F(16) 6D(16)) label='  Shift-F5'
 stop_s    in = (1B(16) 4F(16) 6C(16)) label='  Shift-F6'
 down      in = (1B(16) 5B(16) 38(16) 7E(16)) label='DOWN'
 down_s    in = ()
 up        in = (1B(16) 5b(16) 37(16) 7E(16)) label='UP'
 up_s      in = ()
 edit      in = ()
 edit_s    in = ()
 data      in = ()
 data_s    in = ()

"   TERMINAL VIDEO ATTRIBUTES
 alt_begin           out = (start_alternate)
 alt_end             out = (stop_alternate)
 blink_begin         out = (prefix 35(16) 6D(16))
 blink_end           out = normal_attributes
 inverse_begin       out = (start_inverse)
 inverse_end         out = (stop_inverse)
 underline_begin     out = (start_underline)
 underline_end       out = (stop_underline)

"   LOGICAL ATTRIBUTE SPECIFICATIONS
 error_begin         out = (start_inverse)
 error_end           out = (stop_inverse)
 input_text_begin    out = (start_underline)
 input_text_end      out = (stop_underline)
 italic_begin        out = (start_inverse)
 italic_end          out = (stop_inverse)

"   LINE DRAWING CHARACTER SPECIFICATION
 ld_fine_begin            out = 0E(16)
 ld_fine_end              out = 0F(16)
 ld_fine_horizontal       out = 71(16)
 ld_fine_vertical         out = 78(16)
 ld_fine_upper_left       out = 6C(16)
 ld_fine_upper_right      out = 6B(16)
 ld_fine_lower_left       out = 6D(16)
 ld_fine_lower_right      out = 6A(16)
 ld_fine_up_t             out = 77(16)
 ld_fine_down_t           out = 76(16)
 ld_fine_left_t           out = 74(16)
 ld_fine_right_t          out = 75(16)
 ld_fine_cross            out = 6E(16)
 ld_medium_begin          out = (0E(16) start_alternate)
 ld_medium_end            out = (0F(16) stop_alternate)
 ld_medium_horizontal     out = 71(16)
 ld_medium_vertical       out = 78(16)
 ld_medium_upper_left     out = 6C(16)
 ld_medium_upper_right    out = 6B(16)
 ld_medium_lower_left     out = 6D(16)
 ld_medium_lower_right    out = 6A(16)
 ld_medium_up_t           out = 77(16)
 ld_medium_down_t         out = 76(16)
 ld_medium_left_t         out = 74(16)
 ld_medium_right_t        out = 75(16)
 ld_medium_cross          out = 6E(16)
 ld_bold_begin            out = (start_inverse)
 ld_bold_end              out = (stop_inverse)
 ld_bold_horizontal       out = (' ')
 ld_bold_vertical         out = (' ')
 ld_bold_upper_left       out = (' ')
 ld_bold_upper_right      out = (' ')
 ld_bold_lower_left       out = (' ')
 ld_bold_lower_right      out = (' ')
 ld_bold_up_t             out = (' ')
 ld_bold_down_t           out = (' ')
 ld_bold_left_t           out = (' ')
 ld_bold_right_t          out = (' ')
 ld_bold_cross            out = (' ')

"   END OF TERMINAL DEFINITION FILE FOR Tektronic X terminal.
