"                                                                             "
"   TERMINAL DEFINITION FILE FOR HP-2392 TERMINALS                            "
"   **********************************************                            "
"                                                                             "
"    R. G. Gaebel, RZ ETHZ, 26/08/85                                          "
"    TH. Arn, IBETH, 28/08/85, 29/11/85, 29/05/86, 27/06/86, 22/06/87         "
"                    20/01/88
"                                                                             "
"   VARIABLES                                                                 "
"                                                                             "
    prefix                  = (esc '&')          "prefix of many hp commands  "
    spow_no                 = (prefix 's0B')     "blank overwrites character  "
    clear_display           = (esc 'J')
    cursor_home_key         = (esc 'h')
    enable_keyboard         = (esc 'b')
    disable_keyboard        = (esc 'c')
    select_line_drawing_set = (esc ')B')
    send_cursor_movements   = (prefix 's1A')
    local_cursor_movements  = (prefix 's0A')
    memory_lock_off         = (esc 'm')
    insert_char_off         = (esc 'R')
    set_left_margin         = (esc '4')
    set_right_margin        = (esc '5')
    clear_all_tabs          = (esc '3')
    clear_this_tab          = (esc '2')
    pos_00                  = (prefix 'a00C')
    pos_79                  = (prefix 'a79C')
    label_key_off           = (esc '&j@')
    label_key_on            = (esc '&jB')
    fun_1                   = (esc 'p')
    fun_2                   = (esc 'q')
    fun_3                   = (esc 'r')
    fun_4                   = (esc 's')
    fun_5                   = (esc 't')
    fun_6                   = (esc 'u')
    fun_7                   = (esc 'v')
    fun_8                   = (esc 'w')
    f_key_1                 = (prefix 'f1k2a2d2Lf1' fun_1)
    f_key_2                 = (prefix 'f2k2a2d2Lf2' fun_2)
    f_key_3                 = (prefix 'f3k2a2d2Lf3' fun_3)
    f_key_4                 = (prefix 'f4k2a2d2Lf4' fun_4)
    f_key_5                 = (prefix 'f5k2a2d2Lf5' fun_5)
    f_key_6                 = (prefix 'f6k2a2d2Lf6' fun_6)
    f_key_7                 = (prefix 'f7k2a2d2Lf7' fun_7)
    f_key_8                 = (prefix 'f8k2a2d2Lf8' fun_8)
    margins                 = (pos_00 set_left_margin pos_79 set_right_margin)
    f_key_init              = (f_key_1 f_key_2 f_key_3 f_key_4..
                               f_key_5 f_key_6 f_key_7 f_key_8 label_key_off)
    nice                    = (cursor_home_key pos_00 clear_display)
    video_attr              = (prefix 'd')
    inverse_attr            = (video_attr 'B')
    underline_attr          = (video_attr 'D')
    blink_attr              = (video_attr 'A')
    half_bright_attr        = (video_attr 'H')
    video_off               = (video_attr '@')
"                                                                             "
"   MODEL NAME AND COMMUNICATION TYPE                                         "
"                                                                             "
    model_name          value = 'HP_2392'
    communications      type  = asynch
    application_string  name='driver_procedure' out='tup$bootstrap_hp_driver'
"                                                                             "
"   END OF INFORMATION SPECIFICATION                                          "
"                                                                             "
    end_of_information  in    = (0)
"                                                                             "
"   CURSOR POSITIONING INFORMATION                                            "
"                                                                             "
    cursor_pos_encoding      bias  = (0)    type = ansi_cursor
    cursor_pos_column_first  value = TRUE
    cursor_pos_column_length value = (0)
    cursor_pos_row_length    value = (0)
    cursor_pos_begin         out   = (prefix 'a')
    cursor_pos_second        out   = ('c')
    cursor_pos_third         out   = ('R')
"                                                                             "
"   CURSOR MOVEMENT INFORMATION                                               "
"                                                                             "
    cursor_home              inout = (cursor_home_key)     label = 'Home'
    cursor_up                inout = (esc 'A')             label = 'Up'
    cursor_down              inout = (esc 'B')             label = 'Down'
    cursor_left              inout = (esc 'D')             label = 'Left'
    cursor_right             inout = (esc 'C')             label = 'Right'
"                                                                             "
"   CURSOR BEHAVIOR (for cursor movement keys)                                "
"                                                                             "
    move_past_right          type  = wrap_adjacent_next
    move_past_left           type  = wrap_adjacent_next
    move_past_top            type  = wrap_same_next
    move_past_bottom         type  = wrap_same_next
"                                                                             "
"   CURSOR BEHAVIOR (for character keys)                                      "
"                                                                             "
    char_past_right          type  = wrap_adjacent_next
    char_past_left           type  = stop_next
    char_past_last_position  type  = scroll_next
"                                                                             "
"   TERMINAL ATTRIBUTES                                                       "
"                                                                             "
    automatic_tabbing        value = FALSE
    clears_when_change_size  value = FALSE
    function_key_leaves_mark value = 0
    has_hidden               value = FALSE
    has_protect              value = FALSE
    home_at_top              value = TRUE
    multiple_sizes           value = FALSE
    tabs_to_home             value = FALSE
    tabs_to_tab_stops        value = TRUE
    tabs_to_unprotected      value = FALSE
    type_ahead               value = TRUE
"                                                                             "
"   SCREEN SIZES                                                              "
"                                                                             "
    set_size       rows = 24 columns = 80   out = (0)
"                                                                             "
"   SCREEN AND LINE MODE TRANSITION                                           "
"                                                                             "
    screen_init         out = (f_key_init spow_no select_line_drawing_set)
"                                                                             "
    line_init           out = ()
"                                                                             "
    set_screen_mode     out = (send_cursor_movements memory_lock_off ..
                               margins nice)
"                                                                             "
    set_line_mode       out = (local_cursor_movements clear_all_tabs ..
                               pos_00 set_left_margin label_key_on  ..
                               enable_keyboard)
"                                                                             "
"   TERMINAL CAPABILITIES                                                     "
"                                                                             "
    backspace           in    = (bs)             label = 'Backspace'
    delete_char         inout = (esc 'P')        label = 'Delete Char'
    delete_line_bol     inout = (esc 'M')        label = 'Delete Line'
    delete_line_stay    inout = ()
    erase_char          inout = ()
    erase_end_of_line   inout = (esc 'K')        label = 'ClrEL'
    erase_field_bof     inout = ()
    erase_field_stay    inout = ()
    erase_line_bol      inout = ()
    erase_line_stay     inout = ()
    erase_page_home     inout = ()
    erase_page_stay     in    = (clear_display)   label = 'Refrsh'
    erase_page_stay     out   = (cursor_home_key clear_display)
    insert_char         inout = ()
    insert_line_bol     inout = (esc 'L')         label = 'Insert Line'
    insert_line_stay    inout = ()
    erase_unprotected   inout = ()
    erase_end_of_page   inout = ()
    erase_end_of_field  inout = ()
    insert_mode_begin   inout = (esc 'Q')         label = 'Insert Char Begin'
    insert_mode_end     inout = (esc 'R')         label = 'Insert Char End'
    insert_mode_toggle  inout = ()
    tab_forward         inout = (ht)              label = 'TAB'
    tab_backward        inout = (esc 'i')         label = 'Cntl TAB'
    tab_clear           inout = (clear_this_tab)  label = 'Clear TAB'
    tab_clear_all       inout = (clear_all_tabs)  label = 'Cntl Clear TAB'
    tab_set             inout = (esc '1')         label = 'Set TAB'
"                                                                             "
"   MISCELLANEOUS TERMINAL SEQUENCES                                          "
"                                                                             "
    bell_nak            out = (bel)
    bell_ack            out = ()
    display_begin       out = ()
    display_end         out = ()
    field_scroll_down   out = ()
    field_scroll_set    out = ()
    field_scroll_up     out = ()
    output_begin        out = (cursor_home_key disable_keyboard)
    output_end          out = (enable_keyboard)
    print_begin         out = ()
    print_end           out = ()
    print_page          out = ()
    protect_all         out = ()
    reset               out = ()
    return              out = ()
"                                                                             "
"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION                               "
"                                                                             "
    f1        in = (fun_1)      label = 'F1'
    f2        in = (fun_2)      label = 'F2'
    f3        in = (fun_3)      label = 'F3'
    f4        in = (fun_4)      label = 'F4'
    f5        in = (fun_5)      label = 'F5'
    f6        in = (fun_6)      label = 'F6'
    f7        in = (fun_7)      label = 'F7'
    f8        in = (fun_8)      label = 'F8'
    f9        in = (soh fun_1)  label = 'A1'
    f10       in = (soh fun_2)  label = 'A2'
    f11       in = (soh fun_3)  label = 'A3'
    f12       in = (soh fun_4)  label = 'A4'
    f13       in = (soh fun_5)  label = 'A5'
    f14       in = (soh fun_6)  label = 'A6'
    f15       in = (soh fun_7)  label = 'A7'
    f16       in = (soh fun_8)  label = 'A8'
    f1_s      in = (esc fun_1)   label = 'E1'
    f2_s      in = (esc fun_2)   label = 'E2'
    f3_s      in = (esc fun_3)   label = 'E3'
    f4_s      in = (esc fun_4)   label = 'E4'
    f5_s      in = (esc fun_5)   label = 'E5'
    f6_s      in = (esc fun_6)   label = 'E6'
    f7_s      in = (esc fun_7)   label = 'E7'
    f8_s      in = (esc fun_8)   label = 'E8'
    f9_s      in = (stx fun_1)   label = 'B1'
    f10_s     in = (stx fun_2)   label = 'B2'
    f11_s     in = (stx fun_3)   label = 'B3'
    f12_s     in = (stx fun_4)   label = 'B4'
    f13_s     in = (stx fun_5)   label = 'B5'
    f14_s     in = (stx fun_6)   label = 'B6'
    f15_s     in = (stx fun_7)   label = 'B7'
    f16_s     in = (stx fun_8)   label = 'B8'
"                                                                             "
"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
"                                                                             "
    next      in = (cr)        label = 'RETURN'
    next_s    in = ()          label = ' '
    back      in = (fun_3)     label = 'F3'
    back_s    in = ()          label = ' '
    help      in = (fun_4)     label = 'F4'
    help_s    in = ()          label = ' '
    stop      in = (fun_6)     label = 'F6'
    down      in = (esc 'T')   label = 'DOWN = Roll Down'
    down_s    in = ()          label = ' '
    up        in = (esc 'S')   label = 'UP = Roll Up'
    up_s      in = ()          label = ' '
    fwd       in = (esc 'U')   label = 'FWD = Next Page'
    fwd_s     in = (esc 'F')   label = 'Last = CTL/Home'
    bkw       in = (esc 'V')   label = 'Prev Page'
    bkw_s     in = (ack)       label = 'First = CTL/F'
    edit      in = ()          label = ' '
    undo      in = (fun_5)     label = 'F5'
    undo_s    in = (esc fun_5) label = 'E5 = ESC F5'
"                                                                             "
"   TERMINAL VIDEO ATTRIBUTES                                                 "
"                                                                             "
    alt_begin           out = (half_bright_attr)
    alt_end             out = (video_off)
    blink_begin         out = (blink_attr)
    blink_end           out = (video_off)
    hidden_begin        out = ()
    hidden_end          out = ()
    inverse_begin       out = (inverse_attr)
    inverse_end         out = (video_off)
    protect_begin       out = ()
    protect_end         out = ()
    underline_begin     out = (underline_attr)
    underline_end       out = (video_off)
"                                                                             "
"   LOGICAL ATTRIBUTE SPECIFICATIONS                                          "
"                                                                             "
"   ERROR                                                                     "
"                                                                             "
    error_begin         out = (inverse_attr)
    error_end           out = (video_off)
"                                                                             "
"   INPUT TEXT                                                                "
"                                                                             "
    input_text_begin    out = (underline_attr)
    input_text_end      out = (video_off)
"                                                                             "
"   ITALIC                                                                    "
"                                                                             "
    italic_begin        out = (inverse_attr)
    italic_end          out = (video_off)
"                                                                             "
"   MESSAGE                                                                   "
"                                                                             "
    message_begin       out = (inverse_attr)
    message_end         out = (video_off)
"                                                                             "
"   OUTPUT TEXT                                                               "
"                                                                             "
    output_text_begin   out = ()
    output_text_end     out = ()
"                                                                             "
"   TITLE                                                                     "
"                                                                             "
    title_begin         out = ()
    title_end           out = ()
"                                                                             "
"   LINE DRAWING CHARACTER SPECIFICATION                                      "
"                                                                             "
"        Fine Line Drawing Begin and End Sequences.                           "
"                                                                             "
    ld_fine_begin            out = (so)
    ld_fine_end              out = (si)
"                                                                             "
"        Horizontal and Vertical Characters.                                  "
"                                                                             "
    ld_fine_horizontal       out = (',')
    ld_fine_vertical         out = ('.')
"                                                                             "
"        Box Corner Characters.                                               "
"                                                                             "
    ld_fine_upper_left       out = ('R')
    ld_fine_upper_right      out = ('T')
    ld_fine_lower_left       out = ('F')
    ld_fine_lower_right      out = ('G')
"                                                                             "
"        Intersection Characters.                                             "
"                                                                             "
    ld_fine_up_t             out = ('7')
    ld_fine_down_t           out = ('8')
    ld_fine_left_t           out = ('5')
    ld_fine_right_t          out = ('6')
    ld_fine_cross            out = ('/')
"                                                                             "
"        Medium Line Drawing Begin and End Sequences.                         "
"                                                                             "
    ld_medium_begin          out = (so)
    ld_medium_end            out = (si)
"                                                                             "
"        Horizontal and Vertical Characters.                                  "
"                                                                             "
    ld_medium_horizontal     out = (';')
    ld_medium_vertical       out = (':')
"                                                                             "
"        Box Corner Characters.                                               "
"                                                                             "
    ld_medium_upper_left     out = ('Q')
    ld_medium_upper_right    out = ('W')
    ld_medium_lower_left     out = ('A')
    ld_medium_lower_right    out = ('S')
"                                                                             "
"        Intersection Characters.                                             "
"                                                                             "
    ld_medium_up_t           out = ('3')
    ld_medium_down_t         out = ('4')
    ld_medium_left_t         out = ('1')
    ld_medium_right_t        out = ('2')
    ld_medium_cross          out = ('0')
"                                                                             "
"        Bold Line Drawing Begin and End Sequences.                           "
"                                                                             "
    ld_bold_begin            out = (inverse_attr)
    ld_bold_end              out = (video_off)
"                                                                             "
"        Horizontal and Vertical Characters.                                  "
"                                                                             "
    ld_bold_horizontal       out = (' ')
    ld_bold_vertical         out = (' ')
"                                                                             "
"        Box Corner Characters.                                               "
"                                                                             "
    ld_bold_upper_left       out = (' ')
    ld_bold_upper_right      out = (' ')
    ld_bold_lower_left       out = (' ')
    ld_bold_lower_right      out = (' ')
"                                                                             "
"        Intersection Characters.                                             "
"                                                                             "
    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 n=('FSE_FUNCTION_1') o=('mark_lines')
application_string n=('FSE_FUNCTION_2') o=('break_text')
application_string n=('FSE_FUNCTION_3') o=('copy_text l=m p=a')
" F4 is Help as System Default "
application_string n=('FSE_FUNCTION_5') o=('undo')
application_string n=('FSE_FUNCTION_6') o=('end')
get_text = 'text=$screen_input(''Enter search string'')'
locate = 'if text <> '''' then ; locate_text t=text ; ifend'
application_string n=('FSE_FUNCTION_7') ..
                 out=(get_text ';' locate)
application_string name=('FSE_FUNCTION_8') ..
                   o=('locate_next')
application_string n=('FSE_FUNCTION_9') ..
                 o=('position_cursor l=c c=1+$strlen($lt)')
application_string n=('FSE_FUNCTION_10') o=('align_screen m=c')
application_string n=('FSE_FUNCTION_11') o=('format_paragraphs')
application_string n=('FSE_FUNCTION_12') o=('mark_characters')
application_string n=('FSE_FUNCTION_13') o=('delete_word')
application_string n=('FSE_FUNCTION_14') ..
                 o=('insert_characters nt=''        ''')
application_string n=('FSE_FUNCTION_15') o=('indent_text l=m o=1')
locall = 'if text='''' then ; locate_all ; else ; locate_all t=text ; ifend'
application_string n=('FSE_FUNCTION_16') o=(get_text ' ; ' locall)

application_string name=('FSE_FUNCTION_SHIFT_1') out=('unmark')
application_string name=('FSE_FUNCTION_SHIFT_2') out=('join_text')
application_string name=('FSE_FUNCTION_SHIFT_3') out=('move_text l=m p=a')
select_offset = 'if $OFFSET=0 then ; offset=40 ; else ; offset=0 ; ifend ; '
application_string n=('FSE_FUNCTION_SHIFT_4') o=(select_offset 'alis o=offset')
application_string name=('FSE_FUNCTION_SHIFT_5') o=('mark_characters')
application_string name=('FSE_FUNCTION_SHIFT_6') o=('end no')
application_string name=('FSE_FUNCTION_SHIFT_7') out=('delete_text l=m')
application_string n=('FSE_FUNCTION_SHIFT_8') ..
                   o=('position_cursor d=b ; position_cursor rs=true d=b')
application_string name=('FSE_FUNCTION_SHIFT_9') out=()
application_string name=('FSE_FUNCTION_SHIFT_10') out=()
application_string name=('FSE_FUNCTION_SHIFT_11') out=('center_lines')
application_string name=('FSE_FUNCTION_SHIFT_12') out=()
application_string name=('FSE_FUNCTION_SHIFT_13') out=()
application_string name=('FSE_FUNCTION_SHIFT_14') out=()
application_string name=('FSE_FUNCTION_SHIFT_15') out=('indent_text l=m o=-1')
application_string name=('FSE_FUNCTION_SHIFT_16') out=()

application_string n=('FSE_FUNCTION_1_LABEL') out=('Mark')
application_string n=('FSE_FUNCTION_2_LABEL') out=('Break')
application_string n=('FSE_FUNCTION_3_LABEL') out=('Copy')
" F4 is Help as System Default "
application_string n=('FSE_FUNCTION_5_LABEL') out=('Undo')
application_string n=('FSE_FUNCTION_6_LABEL') out=('Quit')
application_string n=('FSE_FUNCTION_7_LABEL') out=('Locate')
application_string n=('FSE_FUNCTION_8_LABEL') out=('LocNxt')
application_string n=('FSE_FUNCTION_9_LABEL') out=('SkpEL')
application_string n=('FSE_FUNCTION_10_LABEL') out=('Middle')
application_string n=('FSE_FUNCTION_11_LABEL') out=('Format')
application_string n=('FSE_FUNCTION_12_LABEL') out=('MrkCh')
application_string n=('FSE_FUNCTION_13_LABEL') out=('DelWd')
application_string n=('FSE_FUNCTION_14_LABEL') out=('InsWd')
application_string n=('FSE_FUNCTION_15_LABEL') out=('Indent')
application_string n=('FSE_FUNCTION_16_LABEL') out=('LocAll')

application_string n=('FSE_FUNCTION_SHIFT_1_LABEL') out=('Unmark')
application_string n=('FSE_FUNCTION_SHIFT_2_LABEL') out=('Join')
application_string n=('FSE_FUNCTION_SHIFT_3_LABEL') out=('Move')
application_string n=('FSE_FUNCTION_SHIFT_4_LABEL') out=('Width')
application_string n=('FSE_FUNCTION_SHIFT_5_LABEL') out=('MrkChr')
application_string n=('FSE_FUNCTION_SHIFT_6_LABEL') out=('Exit')
application_string n=('FSE_FUNCTION_SHIFT_7_LABEL') out=('Delete')
application_string n=('FSE_FUNCTION_SHIFT_8_LABEL') out=('LocPrv')
application_string n=('FSE_FUNCTION_SHIFT_9_LABEL') out=('      ')
application_string n=('FSE_FUNCTION_SHIFT_10_LABEL') out=('     ')
application_string n=('FSE_FUNCTION_SHIFT_11_LABEL') out=('Center')
application_string n=('FSE_FUNCTION_SHIFT_12_LABEL') out=('      ')
application_string n=('FSE_FUNCTION_SHIFT_13_LABEL') out=('      ')
application_string n=('FSE_FUNCTION_SHIFT_14_LABEL') out=('      ')
application_string n=('FSE_FUNCTION_SHIFT_15_LABEL') out=('Dedent')
application_string n=('FSE_FUNCTION_SHIFT_16_LABEL') out=('      ')
"                                                                             "
"   END OF TERMINAL DEFINITION FILE FOR HP-2645 TERMINAL                      "
