Each terminal has several keys that are available to be used for special purposes. Some of these keys are used as field termination keys, others are used as editing keys. ACUCOBOL-GT supports a large number of special keys, but in the default configuration, only these are used:
|Function Keys 1-20||Help|
|Page Up||Page Down|
|Clear||Clear to End|
|Carriage Return||Control Keys|
The Backspace and Line-Kill keys are whichever keys provide these functions for your operating system. The Backspace key is the one that erases individual characters from a command line; the Line-Kill key is the one that can cancel a command line. On most systems, the key that performs the Backspace function is the one labeled either backspace or delete.
The keyboard interface can be easily configured to meet a variety of needs. The default configuration has the following characteristics:
The Windows column names the keycap on the IBM-PC keyboard that is used for this key. The Termcap column names the terminal database file entry that corresponds to this key for UNIX and VMS systems.
|Tab||Next Field (9)||Tab|
|Host's Line-Kill||Erase Field|
|Up Arrow||Previous-All (52*)||Up||ku|
|Down Arrow||Next-All (53*)||Down||kd|
|Page Up||Page-Up (67*)||PgUp||kP|
|Page Down||Page-Down (68*)||PgDn||kN|
|F1 - F10||1 - 10*||F1 - F10||k1 - k0|
|F11 - F20||11 - 20*||Shft F1 - F10||K1 - K0|
When accepting data from the keyboard, the Terminal Manager runs in one of two modes: standard mode or auto mode. In standard mode, the only way to finish input is by typing one of the allowed termination keys; the cursor may not leave the field. In auto mode, the cursor can leave the field; when the user fills the field with data, it is immediately accepted and the cursor moves on. The setting of auto mode or standard mode is determined by the various clauses specified on the ACCEPT statement.
There are four methods for accepting a field (ACCEPT verb, Format 1), depending on the mode and the presence of either the CONTROL KEY clause or the ON EXCEPTION clause. These methods are:
the field can be accepted only by a termination key. In the default keyboard configuration, these are the Carriage Return and Tab keys.
the field can be accepted by a termination key or by one of the exception keys.
the field can be accepted by a termination key or by filling the field with data.
the field can be accepted by filling it with data, or by a termination key or an exception key.
The Terminal Manager can control more than one field when the program is doing an ACCEPT that refers to a Screen Section item (ACCEPT verb, Format 2). In the course of this ACCEPT, the user can move between the fields by using the Tab, Backtab, Left, Right, Up, Down, Home and End keys; the Tab key acts as a terminate key only in the last field. A Format 2 ACCEPT statement does not support the use of the CONTROL KEY clause; the CRT STATUS phrase of the Special-Names paragraph may be substituted. Data entry for a Screen otherwise falls into four categories much like the above.
The termination and exception keys may be changed by runtime configuration options as described in Redefining the Keyboard.