

"   TERMINAL DEFINITION FILE FOR DIGITAL VT220 TERMINAL                       "

"   VARIABLES                                                                 "
prefix              = (1B(16) 5B(16))
fkey                = (1B(16) 4F(16))
escape              = (1B(16))
clear_home          = (prefix 32(16) 4A(16))
clear_all_tabs      = (prefix '3g')
ansi_mode           = (escape '<')
vt100_mode          = (prefix '61"p')
vt220_mode          = (prefix '62;1"p')
designate_ascii_g0  = (escape '(B')
designate_graph_g1  = (escape ')0')
select_g0           = (0F(16))
application_keypad  = (escape '=')
numeric_keypad      = (escape '>')
autowrap_off        = (prefix '?7l')
autowrap_on         = (prefix '?7h')
set_to_24x80        = (prefix 3F(16) 33(16) 6C(16))
set_to_24x132       = (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      = (prefix '22m')
stop_inverse        = (prefix '27m')
stop_underline      = (prefix '24m')

start_keyload       = (esc 'P0;1|')
stop_keyload        = (esc '\')
load_f6             = ('17/1b5b4c')          " insert line "
load_f7             = ('18/1b5b4d')          " delete line "
load_f8             = ('19/1b5b40')          " insert blank character "
load_f9             = ('20/1b5b50')          " delete character "
load_f10            = ('21/1b5b3468')        " start insert mode "
load_f11            = ('23/1b5b346c')        " stop insert mode "
load_f12            = ('24/1b5b4b')          " clear to end of line "
load_f13            = ('25/1b5b324a0d')      " clear screen "
load_f14            = ('26/1b5b3939397e0d')  " Back "
load_help           = ('28/1b5b32387e0d')    " Help "
load_do             = ('29/1b5b48')          " Do=home "
load_f17            = ('31/1b5b3939387e0d')  " First "
load_f18            = ('32/1b5b357e0d')      " Bkw duplicates PrevScreen "
load_f19            = ('33/1b5b367e0d')      " Fwd duplicates NextScreen "
load_f20            = ('34/1b5b3939377e0d')  " Last "
load_all_keys       = (start_keyload load_f6 ';' load_f7 ';' load_f8 ';' ..
  load_f9 ';' load_f10 ';' load_f11 ';' load_f12 ';' load_f13 ';' load_f14 ..
  ';' load_help ';' load_do ';' load_f17 ';' load_f18 ';' load_f19 ';' ..
  load_f20 stop_keyload)

"   MODEL NAME AND COMMUNICATION TYPE                                         "
model_name          value = 'DEC_VT220_OLD'
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='shift-do'
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 = 24 columns = 80   out = (set_to_24x80)
set_size       rows = 24 columns = 132  out = (set_to_24x132)

"   SCREEN AND LINE MODE TRANSITION                                           "
set_screen_mode     out=( ansi_mode  vt220_mode clear_all_tabs ..
     designate_ascii_g0  designate_graph_g1 select_g0 autowrap_off ..
     load_all_keys application_keypad)

set_line_mode       out=( vt100_mode  ansi_mode  clear_all_tabs ..
     designate_ascii_g0 designate_graph_g1 select_g0 numeric_keypad autowrap_on)

"et_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) prefix '?7l' vt220_mode )

"et_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) prefix '?7h')

"   TERMINAL CAPABILITIES                                                     "
delete_char         inout = (prefix 50(16))    label='shift-f9'
delete_line_bol     inout = (prefix 4D(16))    label='shift-f7'
erase_end_of_line   inout = (prefix 4B(16))    label='shift-f12'
erase_line_stay     inout = (prefix 32(16) 4B(16))
erase_page_home     inout = (clear_home)       label='shift-f13'
insert_char         inout = (prefix 40(16))    label='shift-f8'
insert_line_bol     inout = (prefix 4C(16))         label='shift-f6'
insert_mode_begin   inout = (prefix 34(16) 68(16))  label='shift-f10'
insert_mode_end     inout = (prefix 34(16) 6C(16))  label='shift-f11'
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 = (prefix '17~')         label='f6'
f2        in = (prefix '18~')         label='f7'
f3        in = (prefix '19~')         label='f8'
f4        in = (prefix '20~')         label='f9'
f5        in = (prefix '21~')         label='10'
f6        in = (prefix '23~')         label='11'
f7        in = (prefix '24~')         label='12'
f8        in = (prefix '25~')         label='13'
f9        in = (prefix '26~')         label='14'
f10       in = (prefix '28~')         label='He'
f11       in = (prefix '29~')         label='Do'
f12       in = (prefix '31~')         label='17'
f13       in = (prefix '32~')         label='18'
f14       in = (prefix '33~')         label='19'
f15       in = (prefix '34~')         label='20'

f16       in = (fkey 'M')             label='ke'

f1_s      in = (fkey 'q')             label='k1'
f2_s      in = (fkey 'r')             label='k2'
f3_s      in = (fkey 's')             label='k3'
f4_s      in = (fkey 't')             label='k4'
f5_s      in = (fkey 'u')             label='k5'
f6_s      in = (fkey 'v')             label='k6'
f7_s      in = (fkey 'w')             label='k7'
f8_s      in = (fkey 'x')             label='k8'
f9_s      in = (fkey 'y')             label='k9'
f10_s     in = (fkey 'p')             label='k0'

f11_s     in = (fkey 'P')             label='p1'
f12_s     in = (fkey 'Q')             label='p2'
f13_s     in = (fkey 'R')             label='p3'
f14_s     in = (fkey 'S')             label='p4'

f15_s     in = (fkey 'm')             label='k-'
f16_s     in = (fkey 'l')             label='k,'

"         in = (prefix '2~')          label='IH'   "
"         in = (prefix '1~')          label='Fi'   "
"         in = (prefix '3~')          label='Re'   "
"         in = (prefix '4~')          label='Se'   "

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
next      in = 13            label = 'RETURN'
next_s    in = ()
bkw       in = (prefix '5~')          label='PS'
fwd       in = (prefix '6~')          label='NS'
back      in = (prefix '999~') label='shift-f14'
undo      in = (prefix '21~') label='10'
help      in = (prefix '28~') label='shift-help'
stop      in = (prefix '23~') label='F6'
bkw_s     in = (prefix '998~') label='  Shift-F17'
fwd_s     in = (prefix '997~') label='  Shift-F20'
undo_s    in = (fkey 'u') label='  Shift-F5'
stop_s    in = (fkey 'v') label='  Shift-F6'
down      in = ()
down_s    in = ()
up        in = ()
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 = (prefix '25m')
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 = (0E(16) start_inverse)
ld_bold_end              out = (0F(16) stop_inverse)
ld_bold_horizontal       out = 71(16)
ld_bold_vertical         out = 78(16)
ld_bold_upper_left       out = 6C(16)
ld_bold_upper_right      out = 6B(16)
ld_bold_lower_left       out = 6D(16)
ld_bold_lower_right      out = 6A(16)
ld_bold_up_t             out = 77(16)
ld_bold_down_t           out = 76(16)
ld_bold_left_t           out = 74(16)
ld_bold_right_t          out = 75(16)
ld_bold_cross            out = 6E(16)

"   DEFAULT KEY DEFINITIONS FOR THE FULL SCREEN EDITOR                        "


"   END OF TERMINAL DEFINITION FILE FOR DIGITAL VT220 TERMINAL               "
