"   TERMINAL DEFINITION FILE FOR TAB 132/15 TERMINAL                          "

"   VARIABLES                                                                 "

prefix              = (esc '[')
prefix_2            = (esc '_')
suffix              = (esc '\')

ansi                = (esc '<')
ascii               = (esc '(B' esc ')0' si)
clear_stay          = (prefix '2J')
clear_all_tabs      = (prefix '3g')
decckm              = (prefix '?1l')   " ansi cursor keys              "
deckpam             = (esc '=')        " shifted keypad                "
deckpnm             = (esc '>')        " normal keypad                 "
normal_attributes   = (prefix 'm')
null                = ( nul nul nul nul nul nul nul nul nul nul )
send_nulls          = ( null null null null null null null null null null )
set_to_24x80        = (prefix '?3l')
set_to_24x132       = (prefix '?3h')
soft_key1           = (prefix_2 'L1   S1    ' suffix ..
                       prefix_2 'M1' esc 'Oa' suffix )
soft_key2           = (prefix_2 'L2   S2    ' suffix ..
                       prefix_2 'M2' esc 'OA' suffix )
soft_key3           = (prefix_2 'L3   S3    ' suffix ..
                       prefix_2 'M3' esc 'Ob' suffix )
soft_key4           = (prefix_2 'L4   S4    ' suffix ..
                       prefix_2 'M4' esc 'OB' suffix )
soft_key5           = (prefix_2 'L5   S5    ' suffix ..
                       prefix_2 'M5' esc 'Oc' suffix )
soft_key6           = (prefix_2 'L6   S6    ' suffix ..
                       prefix_2 'M6' esc 'OC' suffix )
soft_key7           = (prefix_2 'L7   S7    ' suffix ..
                       prefix_2 'M7' esc 'Od' suffix )
soft_key8           = (prefix_2 'L8   S8    ' suffix ..
                       prefix_2 'M8' esc 'OD' suffix )
start_alternate     = (prefix '1m')
start_blink         = (prefix '5m')
start_inverse       = (prefix '7m')
start_underline     = (prefix '4m')
stop_alternate      = (prefix 'm')
stop_blink          = (prefix 'm')
stop_inverse        = (prefix 'm')
stop_underline      = (prefix 'm')
tabon               = (prefix_2 'TABON' suffix )
taboff              = (prefix_2 'TABOFF' suffix )
tabdlgnd            = (esc '9')      " display soft keys legends "
vt132               = (prefix '=2l')

"   MODEL NAME AND COMMUNICATION TYPE                                         "
model_name          value = 'TAB_132'
communications      type  = asynch

"   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   = (';')
cursor_pos_third         out   = ('H')

"   CURSOR MOVEMENT INFORMATION                                               "
cursor_home              inout = (prefix 'H')
cursor_up                inout = (prefix 'A')
cursor_down              inout = (prefix 'B')
cursor_left              inout = (prefix 'D')
cursor_right             inout = (prefix 'C')

"   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  Clear_stay tabdlgnd )
set_size  rows = 24 columns = 132  out = (set_to_24x132 Clear_stay tabdlgnd )

"   SCREEN AND LINE MODE TRANSITION                                           "
initialize_terminal sc='$system.change_terminal_attributes fkc=dec_vt100'
screen_init     out = ( ansi ascii vt132 tabon send_nulls )
screen_init     out = ( clear_all_tabs deckpam decckm send_nulls )
screen_init     out = ( soft_key1 soft_key2 soft_key3 soft_key4 send_nulls )
screen_init     out = ( soft_key5 soft_key6 soft_key7 soft_key8 send_nulls )

set_line_mode   out = (ansi clear_all_tabs ascii send_nulls ..
                       deckpnm set_to_24x80 taboff )

"   TERMINAL CAPABILITIES                                                     "
delete_char         inout = (prefix 'P')
delete_line_bol     inout = (prefix 'M')
erase_end_of_line   inout = (prefix 'K')
erase_line_stay     inout = (prefix '2K')
erase_page_stay     inout = (clear_stay)
erase_end_of_page   inout = (prefix 'J')
insert_char         inout = ()
insert_line_bol     inout = (prefix 'L')
insert_mode_begin   inout = (prefix '4h')
insert_mode_end     inout = (prefix '4l')
tab_backward        inout = (prefix 'Z')
tab_clear_all       inout = (clear_all_tabs)
tab_forward         inout = (ht)
tab_set             inout = (esc 'H')

"   MISCELLANEOUS TERMINAL SEQUENCES                                          "
bell_nak            out = (bel)
output_begin        out = (prefix '4l')
backspace           in  = (bs)

"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION                               "
f1        in = (esc 'Oq') label='k1'
f2        in = (esc 'Or') label='k2'
f3        in = (esc 'Os') label='k3'
f4        in = (esc 'Ot') label='k4'
f5        in = (esc 'Ou') label='k5'
f6        in = (esc 'Ov') label='k6'
f7        in = (esc 'Ow') label='k7'
f8        in = (esc 'Ox') label='k8'
f9        in = (esc 'Oy') label='k9'
f10       in = (esc 'Oa') label='S1'
f11       in = (esc 'Ob') label='S3'
f12       in = (esc 'Oc') label='S5'
f13       in = (esc 'Od') label='S7'
f14       in = ()
f15       in = ()
f16       in = ()
f1_s      in = (esc 'OP') label='p1'
f2_s      in = (esc 'OQ') label='p2'
f3_s      in = (esc 'OR') label='p3'
f4_s      in = (esc 'OS') label='p4'
f5_s      in = (esc 'Om') label='k-'
f6_s      in = (esc 'Ol') label='kt'
f7_s      in = (esc 'OM') label='ke'
f8_s      in = (esc 'On') label='k.'
f9_s      in = (esc 'Op') label='k0'
f10_s     in = (esc 'OA') label='S2'
f11_s     in = (esc 'OB') label='S4'
f12_s     in = (esc 'OC') label='S6'
f13_s     in = (esc 'OD') label='S8'
f14_s     in = ()
f15_s     in = ()
f16_s     in = ()

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
next      in = 13         label = 'RETURN'
next_s    in = ()
back      in = ()
back_s    in = ()
help      in = ()
help_s    in = ()
stop      in = (dc4)      label = 'STOP'
stop_s    in = (dle)      label = 'Shift-STOP'
down      in = ()
down_s    in = ()
up        in = ()
up_s      in = ()
fwd       in = ()
fwd_s     in = ()
bkw       in = ()
bkw_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 = (start_blink)
blink_end           out = (stop_blink)
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 = so
ld_fine_end              out = si
ld_fine_horizontal       out = 'q'
ld_fine_vertical         out = 'x'
ld_fine_upper_left       out = 'l'
ld_fine_upper_right      out = 'k'
ld_fine_lower_left       out = 'm'
ld_fine_lower_right      out = 'j'
ld_fine_up_t             out = 'w'
ld_fine_down_t           out = 'v'
ld_fine_left_t           out = 't'
ld_fine_right_t          out = 'u'
ld_fine_cross            out = 'n'
ld_medium_begin          out = (so start_alternate)
ld_medium_end            out = (si stop_alternate)
ld_medium_horizontal     out = 'q'
ld_medium_vertical       out = 'x'
ld_medium_upper_left     out = 'l'
ld_medium_upper_right    out = 'k'
ld_medium_lower_left     out = 'm'
ld_medium_lower_right    out = 'j'
ld_medium_up_t           out = 'w'
ld_medium_down_t         out = 'v'
ld_medium_left_t         out = 't'
ld_medium_right_t        out = 'u'
ld_medium_cross          out = 'n'
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 = (' ')

"   DEFAULT KEY DEFINITIONS FOR THE FULL SCREEN EDITOR                        "

application_string name=('FSE_FUNCTION_1') out=('align_screen top=last_screen')
application_string name=('FSE_FUNCTION_1_LABEL') out=(' Fwd  ')

application_string name=('FSE_FUNCTION_2') out=('align_screen top=current')
application_string name=('FSE_FUNCTION_2_LABEL') out=('LineUp')

application_string name=('FSE_FUNCTION_3') out=('copy_text l=m p=b')
application_string name=('FSE_FUNCTION_3_LABEL') out=(' Copy ')

application_string name=('FSE_FUNCTION_4') out=('mark_lines')
application_string name=('FSE_FUNCTION_4_LABEL') out=(' Mark ')

application_string name=('FSE_FUNCTION_5') out=('undo')
application_string name=('FSE_FUNCTION_5_LABEL') out=(' Undo ')

application_string name=('FSE_FUNCTION_6') out=('Quit')
application_string name=('FSE_FUNCTION_6_LABEL') out=(' Quit ')

application_string name=('FSE_FUNCTION_7') out=('help')
application_string name=('FSE_FUNCTION_7_LABEL') out=(' Help ')

application_string name=('FSE_FUNCTION_8') out=('locate_text $si(''Enter search string'')')
application_string name=('FSE_FUNCTION_8_LABEL') out=('Locate')

application_string name=('FSE_FUNCTION_9') out=('break_text')
application_string name=('FSE_FUNCTION_9_LABEL') out=('Break ')

application_string name=('FSE_FUNCTION_10') out=('align_screen top=first')
application_string name=('FSE_FUNCTION_10_LABEL') out=('First ')

application_string name=('FSE_FUNCTION_11') out=('insert_characters nt='' ''')
application_string name=('FSE_FUNCTION_11_LABEL') out=('InsCh ')

application_string name=('FSE_FUNCTION_12') out=('insel n=1 p=b')
application_string name=('FSE_FUNCTION_12_LABEL') out=('InsLn ')

application_string name=('FSE_FUNCTION_13') out=('exchange_screen_width')
application_string name=('FSE_FUNCTION_13_LABEL') out=('80/132 ')

application_string name=('FSE_FUNCTION_14') out=(' ')
application_string name=('FSE_FUNCTION_14_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_15') out=(' ')
application_string name=('FSE_FUNCTION_15_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_16') out=(' ')
application_string name=('FSE_FUNCTION_16_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_SHIFT_1') out=('align_screen bottom=first_screen')
application_string name=('FSE_FUNCTION_SHIFT_1_LABEL') out=(' Bkw  ')

application_string name=('FSE_FUNCTION_SHIFT_2') out=('align_screen bottom=current')
application_string name=('FSE_FUNCTION_SHIFT_2_LABEL') out=('LineDn')

application_string name=('FSE_FUNCTION_SHIFT_3') out=('move_text l=m p=b')
application_string name=('FSE_FUNCTION_SHIFT_3_LABEL') out=(' Move ')

application_string name=('FSE_FUNCTION_SHIFT_4') out=('unmark')
application_string name=('FSE_FUNCTION_SHIFT_4_LABEL') out=('UnMark')

application_string name=('FSE_FUNCTION_SHIFT_5') out=('end_file')
application_string name=('FSE_FUNCTION_SHIFT_5_LABEL') out=(' Back ')

application_string name=('FSE_FUNCTION_SHIFT_6') out=(' ')
application_string name=('FSE_FUNCTION_SHIFT_6_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_SHIFT_7') out=('position_cursor r=$home_row c=1')
application_string name=('FSE_FUNCTION_SHIFT_7_LABEL') out=(' Home ')

application_string name=('FSE_FUNCTION_SHIFT_8') out=('locate_next')
application_string name=('FSE_FUNCTION_SHIFT_8_LABEL') out=('LocNxt')

application_string name=('FSE_FUNCTION_SHIFT_9') out=('join_text')
application_string name=('FSE_FUNCTION_SHIFT_9_LABEL') out=(' Join ')

application_string name=('FSE_FUNCTION_SHIFT_10') out=('align_screen middle=last')
application_string name=('FSE_FUNCTION_SHIFT_10_LABEL') out=(' Last ')

application_string name=('FSE_FUNCTION_SHIFT_11') out=('delete_characters c=c')
application_string name=('FSE_FUNCTION_SHIFT_11_LABEL') out=('DelCh ')

application_string name=('FSE_FUNCTION_SHIFT_12') out=('delete_lines l=c')
application_string name=('FSE_FUNCTION_SHIFT_12_LABEL') out=('DelLn ')

application_string name=('FSE_FUNCTION_SHIFT_13') out=('activate_screen')
application_string name=('FSE_FUNCTION_SHIFT_13_LABEL') out=('Refrsh')

application_string name=('FSE_FUNCTION_SHIFT_14') out=(' ')
application_string name=('FSE_FUNCTION_SHIFT_14_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_SHIFT_15') out=(' ')
application_string name=('FSE_FUNCTION_SHIFT_15_LABEL') out=(' ')

application_string name=('FSE_FUNCTION_SHIFT_16') out=(' ')
application_string name=('FSE_FUNCTION_SHIFT_16_LABEL') out=(' ')


"   KEY REDEFINITIONS FOR THE FULL SCREEN EDITOR WHEN USED FROM THE PROGRAMMING ENVIRONMENT "

application_string name=('pe_fix_allerr_func') out=('key=9 shift=true')
application_string name=('pe_fix_assist_func') out=('key=5 shift=false')
application_string name=('pe_fix_format_func') out=('key=8 shift=true')
application_string name=('pe_fix_lookup_func') out=('key=9 shift=false')
application_string name=('pe_fix_nxterr_func') out=('key=6 shift=false')
application_string name=('pe_fix_nxtler_func') out=('key=6 shift=true')
application_string name=('pe_fix_run_func')    out=('key=2 shift=false')
application_string name=('pe_fix_rundbg_func') out=('key=2 shift=true')

application_string name=('pe_fixl_assist_func') out=('key=5 shift=false')
application_string name=('pe_fixl_format_func') out=('key=8 shift=true')
application_string name=('pe_fixl_lookup_func') out=('key=9 shift=false')
application_string name=('pe_fixl_nxterr_func') out=('key=6 shift=false')
application_string name=('pe_fixl_run_func')    out=('key=2 shift=false')
application_string name=('pe_fixl_rundbg_func') out=('key=2 shift=true')

application_string name=('pe_template_modify_format_func') out=('key=8 shift=true')
application_string name=('pe_template_modify_lookup_func') out=('key=9 shift=false')

application_string name=('pe_modify_create_format_func') out=('key=8 shift=true')
application_string name=('pe_modify_create_lookup_func') out=('key=9 shift=false')
application_string name=('pe_modify_create_run_func')    out=('key=2 shift=false')
application_string name=('pe_modify_create_rundbg_func') out=('key=2 shift=true')

application_string name=('pe_view_end_func')    out=('key=8 shift=false')
application_string name=('pe_view_export_func') out=('key=8 shift=true')
application_string name=('pe_view_print_func')  out=('key=9 shift=false')

"   END OF TERMINAL DEFINITION FILE FOR TAB 132/15 TERMINAL                   "
