; File: VT220.INI
; 
; Extended Keyboard definitions for Kermit 95.
; Works with any VT terminal type: VT52, VT100, VT102, VT220, or VT320. 
;
; If you don't like the key assignments made in this command file,
; you can edit this file to suit your tastes.
;
;   Frank da Cruz, Christine M. Gianone, and Jeffrey Altman
;   Columbia University, New York City
;   August 1995 
; 
;
if eq "\v(system)" "WIN32" goto MAPKEYS
end 1 \v(cmdfile) only works with Kermit 95 on Windows 95 and Windows NT.

:MAPKEYS
echo Executing \v(cmdfile) for full VT220 key mappings...
if eq "" "\v(xversion)" forward GO	; 1.1.5 and later
echo
echo NOTE: VT220.INI is not needed in Kermit 95 1.1.5 and later.
echo See UPDATES.DOC for details.
echo
set mskermit keycodes off

:GO

; The following are the default anyway, corresponding to the startup states
; of the DEC cursor and auxilliary keypads.

set terminal arrow-keys cursor   ; Arrow keys are in cursor mode by default
set terminal keypad-mode numeric ; DEC keypad in numeric mode by default
;
;        Scan  Kverb         DEC Key            PC Key           PC Key Group
;
set key  \400 \Kgold       ; PF1 (Gold) 95      Num Lock         Numeric keypad
set key \4496 \Kgold       ; PF1 (Gold) NT      Num Lock         Numeric keypad
set key \4143 \Kpf2        ; PF2        95      Keypad /         Numeric keypad
set key \4463 \Kpf2        ; PF2        NT      Keypad /         Numeric keypad
set key  \362 \Kpf3        ; PF3                Keypad *         Numeric keypad
set key  \365 \Kpf4        ; PF4                Keypad -         Numeric keypad

; DEC PF1-PF4 also assigned to PC F1-F4.
;
set key \368  \Kgold       ; PF1 (Gold)         F1               Top Rank F key
set key \369  \Kpf2        ; PF2                F2               Top Rank F key
set key \370  \Kpf3        ; PF3                F3               Top Rank F key
set key \371  \Kpf4        ; PF4                F4               Top Rank F key

; DEC auxiliary keypad digit keys (two each, for Num Lock On and Off).
;
set key \352  \Kkp0        ; KP 0               Keypad 0         Numeric keypad
set key \301  \Kkp0        ; KP 0               Keypad 0         Numeric keypad
set key \353  \Kkp1        ; KP 1               Keypad 1         Numeric keypad
set key \291  \Kkp1        ; KP 1               Keypad 1         Numeric keypad
set key \354  \Kkp2        ; KP 2               Keypad 2         Numeric keypad
set key \296  \Kkp2        ; KP 2               Keypad 2         Numeric keypad
set key \355  \Kkp3        ; KP 3               Keypad 3         Numeric keypad
set key \290  \Kkp3        ; KP 3               Keypad 3         Numeric keypad
set key \356  \Kkp4        ; KP 4               Keypad 4         Numeric keypad
set key \293  \Kkp4        ; KP 4               Keypad 4         Numeric keypad
set key \357  \Kkp5        ; KP 5               Keypad 5         Numeric keypad
set key \268  \Kkp5        ; KP 5               Keypad 5         Numeric keypad
set key \358  \Kkp6        ; KP 6               Keypad 6         Numeric keypad
set key \295  \Kkp6        ; KP 6               Keypad 6         Numeric keypad
set key \359  \Kkp7        ; KP 7               Keypad 7         Numeric keypad
set key \292  \Kkp7        ; KP 7               Keypad 7         Numeric keypad
set key \360  \Kkp8        ; KP 8               Keypad 8         Numeric keypad
set key \294  \Kkp8        ; KP 8               Keypad 8         Numeric keypad
set key \361  \Kkp9        ; KP 9               Keypad 9         Numeric keypad
set key \289  \Kkp9        ; KP 9               Keypad 9         Numeric keypad

; DEC auxiliary keypad punctuation and other keys.  Note that DEC keypads have
; four keys on the right, whereas IBM keypads have only three.  Thus the
; need for an Alt-key modifier on one of them.  Also note that while it might
; seem to make more sense to map DEC Keypad Minus to IBM Keypad Minus, most
; DEC users are accustomed to having PF1-PF4 across the top keypad row.
;
;   NOTE: In Windows 95, KP period with Num Lock on does not 
;   return a unique scan code.
;
set key \366  \KkpDot      ; KP Period          Keypad Period    Numeric keypad
set key \302  \KkpDot      ; KP Period          Keypad Period    Numeric keypad
set key \4365 \KkpEnter    ; KP Enter           Keypad Enter     Numeric keypad
set key \2411 \KkpMinus    ; KP Minus           Alt-Keypad-Plus  Numeric keypad
set key \363  \KkpComa     ; KP Comma           Keypad Plus      Numeric keypad

; DEC Cursor keys
;
set key \4390 \KupArr      ; Up Arrow           Up Arrow         Cursor keypad
set key \4392 \KdnArr      ; Down Arrow         Down Arrow       Cursor keypad
set key \4391 \KrtArr      ; Right Arrow        Right Arrow      Cursor keypad
set key \4389 \KlfArr      ; Left Arrow         Left Arrow       Cursor keypad

; DEC Editing keys, VT220 and above.
;
set key \6445 \KdecFind    ; Find               Alt-Insert      Gray keypad
set key \6436 \KdecInsert  ; Insert             Alt-Home        Gray keypad
set key \6433 \KdecRemove  ; Remove             Alt-Page-Up     Gray keypad
set key \6446 \KdecSelect  ; Select             Alt-Delete      Gray keypad
set key \6435 \KdecPrev    ; Previous Screen    Alt-End         Gray keypad
set key \6434 \KdecNext    ; Next Screen        Alt-Page-Down   Gray keypad

set key \378  \KdecHelp    ; Help = F15         F11 (Can't use Print Screen,
set key \379  \KdecDo      ; Do = F16           F12  Scroll Lock, or Pause)

; DEC Function keys, VT220 and above.
;
;   DEC F5-F10 are on PC F5-F10.
;   DEC F11-F10 are on PC Alt-F1 through Alt-F10.
;
set key \372  \Kbreak      ; F5 /Break          F5               Top Rank F key
set key \373  \KdecF6      ; F6                 F6               Top Rank F key
set key \374  \KdecF7      ; F7                 F7               Top Rank F key
set key \375  \KdecF8      ; F8                 F8               Top Rank F key
set key \376  \KdecF9      ; F9                 F9               Top Rank F key
set key \377  \KdecF10     ; F10                F10              Top Rank F key

set key \2416 \KdecF11     ; F11 / Esc          Alt-F1           Top Rank F key
set key \2417 \KdecF12     ; F12 / BS           Alt-F2           Top Rank F key
set key \2418 \KdecF13     ; F13 / LF           Alt-F3           Top Rank F key
set key \2419 \KdecF14     ; F14                Alt-F4           Top Rank F key
set key \2420 \KdecF15     ; F15 / Help         Alt-F5           Top Rank F key
set key \2421 \KdecF16     ; F15 / Do           Alt-F5           Top Rank F key
set key \2422 \KdecF17     ; F17                Alt-F7           Top Rank F key
set key \2423 \KdecF18     ; F18                Alt-F8           Top Rank F key
set key \2424 \KdecF19     ; F19                Alt-F9           Top Rank F key
set key \2425 \KdecF20     ; F20                Alt-F10          Top Rank F key

end ; of VT220.INI
