EDIT=value

EDIT is used to define an editing action for a key. It must be assigned one of the following values:

Alt Left
Auto-Insert Menu
Backspace Next
Default-Entry Next-All
Default-Next Next-Line
Delete Numeric-Default
Down Numeric-Next
End Page-Down
Erase-All Page-Up
Erase-EOS Previous
Erase Field Previous-All
Erase-Next Previous-Line
Erase-to-End Right
First Switch-Window
Home System-Menu
Insert-Off Toggle-Edit-Mode
Insert-On Toggle-Insert
Insert-Space Up
Last  

The EDIT keyword values specify various editing functions, described below. EDIT keys may also be designated as termination keys. When they are, the EDIT is applied and then the input is terminated. This rule is slightly changed for the actions that move the cursor. With these actions, the field terminates only if the cursor cannot be moved farther in the requested direction. This is detailed in the descriptions of each of the EDIT values.

In the following descriptions, the order of fields is the order in which they appear in the Screen Section. Thus, the next field may not necessarily be the next one on the physical display. This feature can be used to design special purpose screens.

EDIT keyword values can be:

Alt When edit=alt is defined, the user must press the Alt key and the key letter in order to activate the desired control.

The character-based version of the runtime supports the use of key letters for operating controls. By default, if the program has key letters defined for its controls and if the program is currently accepting a control that doesn't allow user input, such as a push-button, checkbox or radio button, the user can move to the control by simply pressing its key letter key. When this happens the accept will be terminated. This default behavior can be changed by setting the runtime configuration variable NO_BARE_KEY_LETTERS to TRUE.

Auto-Insert Auto-Insert causes all following characters to be entered in insert mode. Auto insert mode is automatically reset when the input terminates, or when any other editing key is typed. This style of insertion is the RM/COBOL-85 default method.
Backspace The Backspace function moves the cursor to the left one character and deletes the character found there. If the Backspace function occurs at the left-most field position, it is ignored unless a TERMINATE or EXCEPTION value has been assigned to the key, in which case it is treated as a termination key.
Default-Entry The Default-Entry action erases the remainder of the field starting at the cursor position provided that the cursor is not in the first position of the field. If the cursor is in the first position, this action does nothing. This editing action is intended to be tied to a termination key (such as the "Return" key or the "Tab" key), and to be used as a reasonable method of handling fields that contain default values. If the default is correct, then this key is typed (which does nothing to the field). If the default is wrong, then the correct value is entered and this key is typed (erasing the part of the old field after the new input).
Default-Next Default-Next combines the Default-Entry action and the Next (described below) action.
Delete Deletes the character that the cursor is on (if any).
Down If there are fields below the current cursor location, the cursor moves to the one on the closest lower line. If there is more than one field on this line, the cursor will move to the one closest to its current horizontal location. The cursor will try to stay in the same column. If there are no fields beneath the current line, then this action does nothing unless an EXCEPTION or TERMINATE value has been assigned to it, in which case it acts as a termination key.
End The cursor is moved to the end of the current field, excluding any trailing prompt characters. If the cursor is already at the end of the field, then this key is ignored unless it has a TERMINATE or EXCEPTION value, in which case it is treated as a termination key.
Erase-All All fields controlled by the ACCEPT statement are erased and the cursor is moved to the home position of the first field. This key may not be assigned a TERMINATE or EXCEPTION value.

Under Windows, the field in which the cursor is currently positioned is erased, instead of all fields controlled by the ACCEPT statement being erased.

Erase-EOS The current field is erased from the cursor location to the end of the field, and all fields following the current one are erased. The definition of "following field" is based on the order of fields in the Screen Section. This action may not be assigned a TERMINATE or EXCEPTION value.

Under Windows, the current field is erased from the cursor location to the end of the field, but the fields following the current one are not erased.

Erase-Field The field is erased, and the cursor is moved to the first position of the field.
Erase-Next This action combines the functions of the Erase-to-End action and the Next (described below) action.
Erase-to-End This function erases the field from the current cursor position to the end of the field.
First The cursor is moved to the beginning of the first field controlled by the ACCEPT statement. If the cursor is already in the first field, and the key has been assigned a TERMINATE or EXCEPTION value, then the ACCEPT terminates.
Home The cursor is moved to the beginning of the field. If the cursor is already at the beginning and this key has been assigned a TERMINATE or EXCEPTION value, the ACCEPT terminates.
Insert-Off If insertion mode is currently in effect, it is turned off; otherwise does nothing.
Insert-On This causes all following characters to be entered in insert mode. This causes any trailing characters to be moved one space to the right before the added character is printed. Insertion mode stays in effect until explicitly reset by an Insert-Off, an Auto-Insert, or a Toggle-Insert action. Note that insertion mode stays in effect across multiple ACCEPT statements.
Insert-Space A space character is inserted at the cursor position, moving trailing characters over one position.
Last The cursor moves to the end of the last field controlled by the ACCEPT statement. Trailing prompt characters in the last field are ignored in determining the end of the field. If this key has been assigned a TERMINATE or EXCEPTION value and the cursor is already in the last field, the ACCEPT terminates.

Under Windows, with TERMINATE and EXCEPTION value, if the cursor is at the last field, the ACCEPT does not terminate and the cursor stays at the current field.

Left The cursor is moved one position to the left; if it is already in the left-most field position, it moves to the end of the previous field. If the cursor is in the left-most position of the first field, the key is ignored unless it also has been assigned a TERMINATE or EXCEPTION value, in which case the ACCEPT terminates.

In the case of Windows, the left and right arrow keys move the cursor inside a field but do not act as terminators. Without TERMINATE and EXCEPTION value, if the cursor is in the leftmost position of the first field, the key is not ignored and the cursor is moved to the last field.

Menu The key is defined as a Menu key. Pressing this key will cause a program-defined menu to appear on the screen.
Next Under Windows, without TERMINATE and EXCEPTION value, if the cursor is in the last field, it moves to the first field, instead of moving to the end of the field.
Next-All The cursor moves to the beginning of the next field regardless of whether or not the next field has a Tab-Stop. Thus a key with the Next action will skip controls with the NO-TAB style, while a key with the "Next-All" action will not.

By default, the Down key is assigned the Next-All action. This makes the Down key behave more like it does in a common Windows program. Assign the Down keyword (described above) for a more traditional, text-mode behavior.

Next-Line Next-Line functions the same as the Down action, except that the cursor always moves to the beginning of the left-most field on the new line (instead of maintaining the current cursor column).
Numeric-Default If the field is numeric, then this key acts just like the Default-Entry key. Typing this key at the first character position of a numeric field leaves the field unchanged and accepts the default value. Typing this key when the cursor is not in the first position causes erasure of the field from the cursor position to the end. This key allows the user either to accept the default or type over it without having to worry about blanking out the trailing portion of the field.

If the field is alphanumeric, then this action does not affect the field. Numeric-Default is usually made a termination key, so that typing it causes the ACCEPT to finish.

Numeric-Next If the field is numeric, then this key acts just like the Default-Next key. Typing this key at the first character position of a numeric field leaves the field unchanged, accepts the default value, and advances to the beginning of the next field. Typing this key when the cursor is not in the first position causes erasure of the field from the cursor position to the end. The cursor is then advanced to the beginning of the next field. This key allows the user either to accept the default or type over it without having to worry about blanking out the trailing portion of the field.

If the field is alphanumeric, then this key acts just like the Next key. It advances the cursor to the beginning of the next field and does not affect the current field.

Page-Down This keyword sets the key that pages down a multiline entry field, list box, and combo box.
Page-Left This keyword sets the key that scrolls left one page.
Page-Right This keyword sets the key that scrolls right one page.
Page-Up This keyword sets the key that pages up a multiline entry field, list box, and combo box.
Previous The cursor moves to the beginning of the previous field. If the cursor is in the first field, it moves to the beginning of the field unless the key has been assigned a TERMINATE or EXCEPTION value, in which case it acts as a termination key instead.
Previous-All The cursor moves to the beginning of the previous field regardless of whether or not the previous field has a Tab-Stop. Thus a key with the "Previous" action will skip controls with the NO-TAB style, while a key with the "Previous-All" action will not.

By default, the Up key is assigned the Previous-All action. This makes the Up key behave more like it does in a common Windows program. Assign the Up keyword (described below) for a more traditional, text-mode behavior.

Under Windows, without TERMINATE and EXCEPTION value, if the cursor is in the first field, it moves to the last field, instead of moving to the beginning of the field.

Previous-Line The cursor moves to the beginning of the left-most field on the next higher line. If there are no fields above the current one, this action does nothing unless it has an EXCEPTION or TERMINATE value, in which case it acts as a termination key.
Right This function moves the cursor one position to the right. This will not move the cursor onto any trailing prompt characters (exception: if the prompt character is a space and the field is being updated, the cursor will move over the trailing spaces).

If the cursor is as far right as it is allowed to go, it will move to the beginning of the next field. If there is no following field, this key is ignored unless a TERMINATE or EXCEPTION value has been assigned, in which case the ACCEPT terminates.

In the case of Windows, the left and right arrow keys move the cursor inside a field but do not act as terminators. Without TERMINATE and EXCEPTION value, if the cursor is as far right as it is allowed to go, the key is not ignored and moves to the first field. See Regarding Configuration Variables for more information.

Scroll-Left This keyword sets the key that scrolls left one column.
Scroll-Right This keyword sets the key that scrolls right one column.
Switch-Window This keyword defines the key that, when pressed, causes the system to enter switch window mode. In this mode, the user can press any key to cycle through the modeless windows, with each window border highlighted until the Return key is pressed. Window switching order is from top to bottom.
System-Menu Use the System-Menu function to define the key used to activate a floating window's system menu on a text-mode system.
Toggle-Edit-Mode This keyword defines the key that can be used to toggle the presence of the combo box's drop-down list and the paged list box's search box.
Toggle-Insert If insertion mode is currently in effect, it is turned off. Otherwise, insertion mode is turned on.
Up If there are fields above the current cursor location, the cursor moves to the one on the closest higher line. If there is more than one field on this line, the cursor moves to the field closest to its current location. The cursor will try to stay in its current column. If there are no lines above the current line with active fields, then this key is ignored unless it has a TERMINATE or EXCEPTION value, in which case it acts as a termination key.