filename.keyboards Definition/Access: General


Command filename.keyboards Definition/Access: General
Applicable release versions: AP
Category Access: General (65)
Description contains two types of items:

1) Alternative keyboard definitions, including British, French, German, Italian, Spanish and USA for PC type systems (AP/SCO, AP/Native, AP/DOS), for the TCL verb "set-kbrd".

2) Keyboard input translation items for the TCL verb "set-imap".

The format of the keyboard input translation for "set-imap" is as follows:

- Attribute one must contain the keyword 'IMAP', optionally followed by one or more modifiers, separated by spaces. Valid modifiers are:


Sets esc-data. This option should be used if any input sequence contains an escape.


Sets esc-level. This option could be used if no input sequence contains an escape.


Enables the extended character set (8 bit characters).


Disables the extended character set.

'timeout' value

Sets the default timeout to 'value', expressed in milliseconds. This value can be overridden on a per-port basis by "set-imap". See "set-imap" for the meaning of the timeout and precaution about this feature.

- Each line defines a translation where the input sequence and the converted sequence are separated by a colon (':'). If the converted string is null, then the input sequence corresponds to a key which will be ignored.

"input sequence" : "converted sequence"

- Any text after a '*' is ignored, except when enclosed in quotes. Spaces are ignored, except when enclosed in quotes. Empty lines are ignored.

- Each element in the input sequence or the converted string are separated by commas.

- Characters and strings are represented by c'abc..' or c"abc...". Example:

- Hexadecimal values and strings are represented by x'NN' or x'NNNNNN..', where each pair of hexadecimal digits are assembled into one byte. Example:

- Decimal values are represented normally.

- Control characters are specified by a caret ('^') followed by the corresponding letter, in upper or lower case. Example:

- The following keywords can be used anywhere to represent the usual ASCII codes:

BS : x'08' LF : x'0A' CR : x'0D'
ESC : x'1F' DEL: x'7F'
The following example illustrates the IBM 3151 keyboard input definition to use 
special keys in the Update processor.

IMAP timeout 50 esc-data
* IBM 3151

* Cursor movement
ESC,c'D'           : ^J          * <-
ESC,c'C'           : ^K          * ->
ESC,c'B'           : ^N          * down arrow
ESC,c'A'           : ^B          * up arrow

* Editing keys
ESC,c'Q'           : ^l          * delete
ESC,c'P ',BS       : ^w          * insert

* Function keys F1 - F12
ESC,c'a',13        : ^x,c'1'     * F1  : Hot key 1
ESC,c'b',x'0d'     : ^x,c'2'     * F2  : Hot key 2

* Function keys F13 - F24
ESC,c'!a',CR       : c'off',CR   * F13 : OFF
ESC,c'!b',CR       : c'end',CR   * F14 : END

* One key functions
DEL                : ^l         * Del 

* Ignored keys
ESC,c'"A'          :            * Num Lock
Related tcl.set-kbrd