Home ]   [ Kermit 95 ]   [ C-kermit ]   [ Scripts ]   [ Current ]   [ New ]   [ FAQ ]   [ Support ]

KERMIT 95 VT220 / VT320 FUNCTION KEY MAPPING

Kermit 95 is Columbia University's communications software for Windows, with 40+ terminal emulations including DEC VT320 and below available over serial-port, modem, Telnet, SSH, and other kinds of connections, plus Kermit and XYZMODEM file transfer, scripting, and many other features, including a flexible key mapping mechanism, which allows (for example) the PC keyboard to be mapped to a DEC terminal keyboard.

This page applies to DEC VT220, 320, 420, and 520 series terminals with the standard DEC LK201 keyboard. It does NOT apply to the DEC VT100 series, which does not have Function (F) keys.


DEC VT220/320 (LK201) Keyboard (CLICK IMAGE to magnify).


(CLICK IMAGE to magnify)
  A glance the DEC keyboard layout diagrams above and at left reveals that the DEC LK201 and IBM 101 keyboards are quite different, especially in the top row. Those who wish to map the DEC keyboard to the IBM one quickly find that the DEC keyboard has more function keys: 16 versus 12 on the PC keyboard. To confound the confusion, DEC's F-keys are labeled F6 through F20 (F1-F4 are only for local use) and DEC and IBM keys that have the same function (e.g. Local Print = Print Screen, Hold Session = Scroll Lock) are in different places.

No mapping of DEC to IBM F-keys will please everyone. Kermit 95 comes with a default mapping, which is described here. If you don't like it, you can change it as described below. Here is the default mapping of DEC to IBM F-keys:

DEC key IBM key Kverb Remarks
Hold Session Scroll Lock \KholdScrn  
Local Print Alt-p \Kdump  
Set Up (none)    
Switch Session (none)    
F5 F5 \KBreak Send BREAK
F6 F6 \KdecF06 DEC F6
F7 F7 \KdecF07 DEC F7
F8 F8 \KdecF08 DEC F8
F9 F9 \KdecF09 DEC F9
F10 F10 \KdecF10 DEC F10
F11 Alt-F1 \KdecF11 DEC F11: ESC (Escape)
F12 Alt-F2 \KdecF12 DEC F12: BS (Backspace)
F13 Alt-F3 \KdecF13 DEC F13: LF (Linefeed)
F14 Alt-F4 \KdecF14 DEC F14
F15 Alt-F5 \KdecF15 The DEC Help key
F16 Alt-F6 \KdecF16 The DEC Do key
F17 Alt-F7 \KdecF17 DEC F17
F18 Alt-F8 \KdecF18 DEC F18
F19 Alt-F9 \KdecF19 DEC F19
F20 Alt-F10 \KdecF20 DEC F20

To change the key map, you need to write a SET KEY or SET TERMINAL KEY command for each key you wish to remap. Each such command requires a keycode to identify the key or key combination to be mapped, and a value to map it to. The value can be a "Kverb" (Keyboard Verb), such as the ones listed above. A Kverb with a name like "\KdecXX" means "send what the DEC xx key would send". You can find a complete listing of Kermit 95 keycodes HERE, or you can use the SHOW KEY to find out the keycode of any key or key combination:

[C:\olga\tmp\] K-95> show key
 Press key: (Press Alt-F5 here)
 Key code \2420 Alt-F5 (default) => Verb: \Kdecf15
[C:\olga\tmp\] K-95>

This tells you that the keycode for Alt-F5 is 2420 and its current assignment (valu) is the Kverb \Kdecf15. Note that in SET (TERMINAL) KEY commands:

Here's a table of IBM F keys, their default assignments in VT220 and VT320 emulation, and their keycodes:

Key Keycode Value Remarks
F1 368 \Kgold DEC PF1 = The Gold Key
F2 369 \Kpf2 DEC PF2
F3 370 \Kpf3 DEC PF3
F4 371 \Kpf4 DEC PF4
F5 372 \KdecF05 DEC Break key (= \Kbreak)
F6 373 \KdecF06 DEC F6
F7 374 \KdecF07 DEC F7
F8 375 \KdecF08 DEC F8
F9 376 \KdecF09 DEC F9
F10 377 \KdecF10 DEC F10
F11 378 \KdecF15 DEC Help Key (= \KdecHelp)
F12 379 \KdecF16 DEC Do Key (= \KdecDo)

And here is a table of IBM F-Alt-key combinations, as above:

Key Keycode Value Remarks
Alt-F1 2416 \KdecF11 DEC F11: ESC (Escape)
Alt-F2 2417 \KdecF12 DEC F12: BS (Backspace)
Alt-F3 2418 \KdecF13 DEC F13: LF (Linefeed)
Alt-F4 2419 \KdecF14 DEC F14
Alt-F5 2420 \KdecF15 DEC Help (= \KdecHelp)
Alt-F6 2421 \KdecF16 DEC Do (= \KdecDo)
Alt-F7 2422 \KdecF17 DEC F17
Alt-F8 2423 \KdecF18 DEC F18
Alt-F9 2424 \KdecF19 DEC F19
Alt-F10 2425 \KdecF20 DEC F20
Alt-F11 2426 (undefined)  
Alt-F12 2427 (undefined)  

Shift-F-key combinations are reserved for DEC User Defined Keys (that is, for keys whose values can be defined by escape sequences sent from the host application). Of course you can redefine these too if you wish, as well as define Ctrl-F-key, Ctrl-Alt-F-key, Ctrl-Shift-F-key, or any other combinations you wish. Just use SHOW key to obtain the keycodes, or consult the TABLE.

To remap keys, use SET KEY (which applies universally) or SET TERMINAL KEY (which applies only to a particular emulation). Suppose, for example, you want to remap the F1 key to perform the Hold Session function. Use any of the following commands:

[C:\olga\tmp\] K-95> set key 368 \KholdScrn
[C:\olga\tmp\] K-95> set terminal key vt220 368 \KholdScrn
[C:\olga\tmp\] K-95> set terminal key vt320 368 \KholdScrn

The first one stays in effect, even if you switch to another terminal emulation. The second applies only to VT220 emulation, and the third to VT320.

Put SET [TERMINAL] KEY Commands in...   If you want them to...
\v(appdata)K95CUSTOM.INI Apply to all your connections.
Dialer Entry Keyboard Page Apply to a particular connection.

The DEC (and all other) Kverbs are listed in your Kermit 95 Manual:

Help  -> Kermit 95 Manual  -> Index to Reference Materials  -> Terminal Emulation  -> List of Keyboard Verbs

For complete instructions on key mapping, consult Chapter 7 of the Kermit 95 manual.

This File Last Updated: Thu Dec 18 16:29:02 2003 EST

[ Top ] [ Keycodes ] [ K95 README ] [ K95 FAQ ] [ K95 Home ] [ Kermit Home ]


Kermit 95 FAQ / Columbia University / kermit@columbia.edu