[serial]    ;Required Keyword Identifier
;
;	This file defines two terminal types (VT100 and VT220) and 
;	their respective keyboard scancodes, graphics character 
;	control sequences, and escape sequences.  You may need to 
;	modify these definitions for your specific VT100 or VT220 
;	terminal.
;
;	You will need to include additional definitions if you are
;	using other terminal types.  
;


;KEY SEQUENCE DEFINITION CODES

;	\E   = escape character ( 0x1b )
;	\;   = literal ';' 
;	^x   = control x for an appropriate x
;	       ie:  ^A would map to 0x01
;	\010 = octal number, must have 3 digits 
;	%2d  = print decimal as 2 digits 
;	       ie: a 1 becomes 01
;	       ie: a 100 becomes 00
;	%d   = print decimal
;	;    = character to begin a comment string
;
;	No spaces are allowed within any string body


;FONT DEFINITION SECTION

[font] 1   ; This font maps the PC font to a VT220 font
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0x00
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0x08 
           0x20, 0x20, 0x20, 0x20, 0xB6, 0xA7, 0x20, 0x20,  ; 0x10 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0x18 
           0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,  ; 0x20 
           0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,  ; 0x28 
           0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,  ; 0x30 
           0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,  ; 0x38 
           0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,  ; 0x40 
           0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,  ; 0x48 
           0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,  ; 0x50 
           0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,  ; 0x58 
           0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,  ; 0x60 
           0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,  ; 0x68 
           0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,  ; 0x70 
           0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,  ; 0x78 
           0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7,  ; 0x80 
           0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5,  ; 0x88 
           0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFB, 0xF9,  ; 0x90 
           0xFD, 0xD6, 0xDC, 0xA2, 0xA3, 0xA5, 0x20, 0x20,  ; 0x98 
           0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA,  ; 0xA0 
           0xBF, 0x20, 0x20, 0xBD, 0xBC, 0xA1, 0xAB, 0xBB,  ; 0xA8 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xB0 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xB8 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xC0 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xC8 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xD0 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xD8 
           0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xE0 
           0x20, 0x20, 0x20, 0x20, 0x20, 0xF8, 0x20, 0x20,  ; 0xE8 
           0x20, 0xB1, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,  ; 0xF0
           0xB0, 0x20, 0x20, 0x20, 0x20, 0xB2, 0xB7, 0x20   ; 0xF8 


;
; The following VT220 8 bit terminal definition varies with 
; each specific terminal and MAY require modification for the 
; keyboard to be functional.
;


;TERMINAL DEFINITION SECTION 

[terminal] 0

        [type]             vt220
        [init]             \233?25l\2332J
        [clear]            \2332J
        [cur_up]           \2331A
        [cur_dwn]          \2331B
        [cur_r]            \2331C
        [cur_l]            \2331D
        [cur_off]          \233?25l
        [cur_on]           \233?25h
        [cur_pos]          \233%d\;%dH
        [rev_on]           \2337m
        [rev_off]          \2330m
        [restore]          \2330\;0H\2332J\Ec
        [no_lines]         24
        [font_no]          1		;Use index 1 for the font definition


;KEYBOARD DEFINITION SECTION

        [keyboard]
            [enter_k]         \015
            [tab_k]           \011
            [back_tab_k]      \217E     ; Shifted F3 
            [up_arrow_k]      \233A
            [dwn_arrow_k]     \233B
            [r_arrow_k]       \233C
            [l_arrow_k]       \233D
            [space_k]         \040
            [insert_k]        \2331~       
            [delete_k]        \2334~       
            [bksp_k]          \010         
            [home_k]          \2332~       
            [end_k]           \2335~          
            [ctrl_home_k]     \217C     ; Shifted F1
            [ctrl_end_k]      \217D     ; Shifted F2
            [pg_up_k]         \2333~       
            [pg_dwn_k]        \2336~       
            [f1_k]            \217c        
            [f2_k]            \217d        
            [f3_k]            \217e        
            [f4_k]            \217f        
            [f5_k]            \217g        
            [f6_k]            \217h        
            [alt_f6_k]        \217H     ; Shifted F6 
            [f7_k]            \217i        
            [f8_k]            \217j        
            [f9_k]            \216o         
            [f10_k]           \216p         
            [f11_k]           \216q         
            [f12_k]           \216r         


;GRAPHICS DEFINITION SECTION

        [graphics]
            [upper_left_corner]      ^Ol
            [upper_right_corner]     ^Ok
            [lower_left_corner]      ^Om
            [lower_right_corner]     ^Oj
            [horizontal_bar]         ^Oq
            [vertical_bar]           ^Ox
            [left_tbar]              ^Ot
            [right_tbar]             ^Ou
            [bottom_tbar]            ^Ov
            [top_tbar]               ^Ow
            [plus]                   ^Og
            [checkerboard]           ^Oa
            [up_arrow_char]          \136
            [dwn_arrow_char]         \E)B^Nv^O 
            [enter_g_mode]           \E(0
            [exit_g_mode]            \E(B
            [elev_up_char]           ^O` 
            [elev_down_char]         ^O` 
            [elev_body_char]         ^Oa
            [elev_mark_char]         O
            [r_list_sel]             >
            [l_list_sel]             <
            [radio_sel]              ^O`
            [abar_check]             ^Of
            [pin_char]               ^Of
            [cross_bar]              ^On


;
; The following VT100 terminal definition varies with 
; each specific terminal and MAY require modification for the 
; keyboard to be functional.
;


;TERMINAL DEFINITION SECTION 

[terminal] 1
                       
        [type]            vt100
        [init]            \E[0m\E[33l\E[34l\E[?25l\E[?10l
        [clear]           \E[H\E[0J
        [cur_up]          \E[1A
        [cur_dwn]         \E[1B
        [cur_r]           \E[1C
        [cur_l]           \E[1D
        [cur_off]         \E[?25l
        [cur_on]          \E[?25h
        [cur_pos]         \E[%d\;%df
        [rev_on]          \E[1m
        [rev_off]         \E[0m
        [restore]         \Ec\E!p
        [no_lines]        24
        [font_no]         0		;Use the default index 0 for the 
					;font definition.  If the default
					;is used, the font is passed to 
					;the terminal and is not remapped.


;KEYBOARD DEFINITION SECTION

        [keyboard]
            [enter_k]         \015
            [tab_k]           \011
            [back_tab_k]      \EOE      ; Shifted F3 
            [up_arrow_k]      \E[A
            [dwn_arrow_k]     \E[B
            [r_arrow_k]       \E[C
            [l_arrow_k]       \E[D
            [space_k]         \040
            [insert_k]        \EOp      ; Keypad Ins
            [delete_k]        \EOn      ; Keypad Del
            [bksp_k]          \010         
            [home_k]          \EOw      ; Keypad Home
            [end_k]           \EOq      ; Keypad End  
            [ctrl_home_k]     \EOC      ; Shifted F1
            [ctrl_end_k]      \EOD      ; Shifted F2
            [pg_up_k]         \EOy      ; Keypad Pg Up
            [pg_dwn_k]        \EOs      ; Keypad Pg Dn 
            [f1_k]            \EOc        
            [f2_k]            \EOd        
            [f3_k]            \EOe        
            [f4_k]            \EOf        
            [f5_k]            \EOg        
            [f6_k]            \EOh        
            [alt_f6_k]        \EOH      ; Shifted F6 
            [f7_k]            \EOi        
            [f8_k]            \EOj        
            [f9_k]            \ENo         
            [f10_k]           \ENp         
            [f11_k]           \ENq         
            [f12_k]           \ENr         


;GRAPHICS DEFINITION SECTION

        [graphics]
            [upper_left_corner]      ^Ol
            [upper_right_corner]     ^Ok
            [lower_left_corner]      ^Om
            [lower_right_corner]     ^Oj
            [horizontal_bar]         ^Oq
            [vertical_bar]           ^Ox
            [left_tbar]              ^Ot
            [right_tbar]             ^Ou
            [bottom_tbar]            ^Ov
            [top_tbar]               ^Ow
            [plus]                   ^Og
            [checkerboard]           ^Oa
            [up_arrow_char]          \136
            [dwn_arrow_char]         \E)B^Nv^O 
            [enter_g_mode]           \E(0
            [exit_g_mode]            \E(B
            [elev_up_char]           ^O` 
            [elev_down_char]         ^O` 
            [elev_body_char]         ^Oa
            [elev_mark_char]         O
            [r_list_sel]             >
            [l_list_sel]             <
            [radio_sel]              ^O`
            [abar_check]             X
            [pin_char]               ^Of
            [cross_bar]              ^On
[eof]
