Updated August 2020; see History
These codes are used to selectively enable individual exit keys (and corresponding return codes) you wish to process. For example, if you want to process a Ctrl+R by returning the cursor to home or previous screen, then you will have to enable use of the Ctrl+R. Where possible, the codes are equal to the exitcode value returned to make them easier to remember. An attempt at exiting a field with a disabled exit key produces a beep.
Note that not all of the available exit keys are enabled in this manner. The Enter key is always enabled (any field may be exited with Enter). The abort key Ctrl+E is always enabled unless disabled with the W code. The time-out abort is activated by specifying a non-zero value for the timer parameter.
The following table, like the others, is organized by the alphabetical order of the type code characters. See the exitcode parameter for a table ordered by exitcode values.
Value |
Description |
? |
Help key allowed. Displays message on bottom line "Hit `?' for Help", and returns exitcode = 8 if help key entered. Leaves the value of entry as it was before calling INFLD. Note that the help key, message, and message location may be customized. |
||< |
Type ||< may be used with ||S (selection-only combo boxes) to force an exit with EXITCODE 32 whenever the selection changes due to the user typing a keyboard character. The concept is the same as for ||5 and ||3 as described below. |
|a |
Enable Ctrl+A (when cursor already at start of field) to return exitcode=19. (Ctrl+A normally moves cursor tostart of previous word.) |
|B |
Enable Ctrl+B to return exitcode=16, and Ctrl+O to return exitcode=17. |
|C |
Enable Ctrl+S to return exitcode=26. |
||E |
Causes Enter to return exitcode 23 instead of the normal 0. This can be useful in certain dialog situations (particularly involving AUI_EVENTWAIT) where either the correct response to Enter, or the meaning of a response of exitcode 0, might otherwise be ambiguous. |
k |
Enable Ctrl+E to return exitcode=15 (rather than its normal use as the record abort key, which sets inxctl=1.) |
L |
Enable Ctrl+L (Right-arrow). Returns exitcode=12 if right arrow hit when cursor already at right end of field. |
|L |
The combination |L (vertical bar, L) is the same as type L (without the vertical bar) in that it triggers exitcode 12. The difference is that with L by itself, you can only exit from the far right side of the field. (If there are characters to the right of the cursor, then the right arrow key will simply move the cursor to the right.) With |L, you can exit the field from any position, provided you have not already used other editing or cursor motion keys first. This mode is useful for Right-Arrow to skip from one field to the next. |
|N |
Enable Ctrl+N to return exitcode=22 (instead of just moving the cursor to the end of the field). |
|Q |
Enable Ctrl+P to return exitcode=25 (instead of initiating a screen snapshot). |
T |
Allow Tab key as a terminator. Sets inxctl to 3 and exitcode to 7. |
||T |
Causes Enter to act like Tab (returning exitcode 7). This might help simplify dialog logic, particularly when using EVENTWAIT with the EVW_EXCDFOCUS option, by eliminating the need for special treatment of the exitcode 0 case. |
|U |
Enable Ctrl+U to return exitcode=21 (instead of just moving the cursor to the start of the field). |
V |
Trap Ctrl+C and return exitcode=10 (instead of the normal mode which aborts to the BASIC error trapping routine). Note that you must specify the exitcode parameter for this to work. See also Ctrl+C Behavior. |
|w |
Enable Ctrl+W to return exitcode=20 (when at the start of an empty field) |
|W |
Enable Ctrl+W to return exitcode=1 and inxctl=1, instead of moving the cursor to the start of the next word. |
|XX |
Enable Ctrl+X to return exitcode=27. Note that this is a special case of the general three-character type sequence |X* which causes Ctrl+X to be interpreted as Ctrl+* (where * is any character compatible with the Ctrl key). |
|Z |
Enable Ctrl+Z to return exitcode=18 (instead of clearing the field). |
1 |
Enable Escape, returns exitcode=1. Note that this is only effective when used without the E code (see above). This differs from Escape with the E code in that the contents of the field are not overwritten with "END". Also note that the Ctrl+E abort key also returns exitcode=1. |
2 |
Enable Left-arrow (Backspace on most PCs), returns exitcode=2. This is only effective without the E code, and is intended to be processed as a move to previous field. |
|2 |
(vertical bar followed by 2) (Windows/ATE) (GUI mode only) Forces Shift+Tab to return exitcode 2 (like left arrow would if type 2 was specified). Otherwise Shift+Tab acts exactly like Up-arrow, meaning it will exit with exitcode set to 3 if type 3 specified. Unlike left arrow, Shift+Tab does not require that the cursor be in the home position in order to be treated as an exit key. Note that type |2 neither requires type 2 nor implies it. In other words, type |2 by itself will enable Shift+Tab exits (setting exitcode 2) but will not enable the Left-Arrow exit. Use type 2|2 or |22 to allow both methods of exiting. |
3 |
Enable Up-arrow, returns exitcode=3. Should be processed as either a return to previous field, or to next field above cursor in same column. |
|3 |
Types |3 and |5 are equivalent to the existing Types 3 and 5, respectively, except that if used with a combo box, they also cause the up/down arrows to exit immediately (with the corresponding exitcode), rather than scroll among the choices in the combo box, PROVIDED THAT the combo box is not already in the dropdown position. (This is directly analogous to the XTREE coldef option ScrollMode=Tree.) An additional side-effect of |3 and |5 (versus 3 and 5) is that Shift+Up-arrow and Shift+Down-arrow will now act as they do in text mode (i.e. get translated via the function key translation system), even if |K (Windows keyboard mode) is in effect. |
||3 |
Types ||5 and ||3 act just like |5 and |3 respectively, except that the exit occurs AFTER updating the display (with the next or previous item in the list), instead of BEFORE. Thus they work similarly to the SelChgExit feature of XTREE, allowing you to update some other display element to correspond with the currently displayed item in the combo box. |
4 |
Enable Ctrl+R, returns exitcode=4. Should be processed as a return to first field in screen, or to previous screen (in multi-screen applications). |
5 |
Enable Ctrl+J (down arrow), returns exitcode=5. Should be processed as an advance to next field or next line (skipping fields on current line). |
|5 |
See |3. |
||5 |
See ||3. |
6 |
Enable Ctrl+T, returns exitcode=6 and should be processed as an exit out of screen (usually to the ANY CHANGE? prompt). This is particularly useful to terminate change mode when the cursor is allowed to be moved about freely between fields (with the above codes). |
7 |
Enable Spacebar, returns exitcode=13. |
8 |
Enable Rubout or Delete, returns exitcode=14 if cursor is in the first position of the field. |
9 |
Enable Ctrl+^ (Home). Returns exitcode=9 if Ctrl+^ (Home) key hit, and should be processed as a return to first field of screen |
|9 |
Causes Ctrl+HOME to exit with exitcode 9. This is mainly intended for use with Windows keyboard mode (|K) where you would probably want the HOME key to just move the cursor to the start of the field (like Ctrl+U), in which case you would want to omit the type 9 and just use |9. |
History
2020 August, A-Shell 6.5.1688: Added |9.