URL: http://www.firstbasesoftware.com/man/man5/input.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
The FirstBase supports two basic kinds of input mechanisms. The first, the default, is labeled Basic Input. The second, a more advanced version, is called Editable Input. A simple FirstBase setup variable, EDITINPUT, controls which input mechanism is used. See setup(5) and keyboard(5) for more details.
Alternately, FirstBase provides control over the use of input dots and the clearing of these fields before accepting input. These tunable variables are described in setup(5).
If an invalid keystroke is received, or an entry length is exceeded, FirstBase pauses with an error message on the 23rd line of the display terminal. The user must then acknowledge the error by touching any key on the keyboard to recover from the error. FirstBase then continues where it left off.
In this way, only potentially correct data is passed on to waiting programs. The following is a summary of features and rules concerning user input into FirstBase:
Also accepted as date input are strings that have embedded slashes or dashes in them. Using this method, 1-5-89 would redisplay as 01/05/89.
Alternately, the environment variable DECIMAL can be used to allow a decimal point to be entered.
Negative dollar amounts will be redisplayed within parenthesis or with a negative sign, depending on the environment variable NEGATIVE. See setup(5) for more details.
The ABORT keystroke is <CONTROL>-X (^X) or <CONTROL>-C (^C). This will effectively exit what you are doing without making any changes to the file, record or field being edited. Note that these two keystrokes are synonymous, and that <FUNCTION>-ABORT will work as well.
The END keystroke is the minus sign (-) entered while cursor is in the first column of its input entry field. If allowed in the context of the input entry, this single keystroke sends a signal to the program to back out one level from whatever it is doing. Backing out from the top level takes the user back to the shell -- i.e., it effectively exits the program. <FUNCTION>-END will work, also.
Note: for numeric, dollar, and float type fields, the first endkey ('-') entered could be a minus sign. In these cases, a second endkey keystroke produces the END signal. Again, this must occur in columns one and two of the input field.
The ERASE keystroke is <CONTROL>-U (^U), and behaves exactly like the UNIX erase keystroke (^X or ^U). This keystroke will delete all input in the current entry field and allow the user to restart that field afresh.
In many places, the HELP keystroke <CONTROL>-H (^H), will provide the user with a summary of commands or information that might be helpful at that point in program. <FUNCTION>-HELP works for help, too.
The WORD-ERASE keystroke is <CONTROL>-W (^W), and is the same as the UNIX Cshell (csh) word erase. This keystroke will erase the most recent word typed. The REFRESH-SCREEN keystroke is <CONTROL>-L (^L), or <CONTROL>-R (^R). This keystroke is allowed at any time and will clear and redraw the entire screen display.
Additionally, the signals PAGEUP, PAGEDOWN, NEXT, PREV, PRINT, DEFAULT, WRITEREC, and DELETEREC can be mapped to function keys via setup(5). Currently, these signals are only used by dbvedit(1).
In general, Editable Input mode is a superset of Basic Input mode, with the added dimension of user defined keystrokes to represent various signals and intraline editing commands.
Standard terminal function keys, arrow keys, and generalized control and escape sequences can be bound to any of the FirstBase signals. This feature allows the use of emacs style editing keystrokes.
There are a few minor differences between Basic and Editable modes. First, errors in length and type are reported only as a bell (or a flash for visible bell users), and never require user acknowledgement. Second, keyboard input is never allowed to extend past the edge of a field.
Third, overflow input is truncated. In other words, if you type into the middle of a field, and there are characters to the right of the cursor, they will shift right as more characters are inserted. If too many characters are inserted, the last character is silently truncated.
Finally, some standard FirstBase signals will work from the middle of fields. These include NEXT and PREV, as well as the END signal (but not the dash when used as the END keystroke).
To enable the Editable Input mode, the EDITINPUT setup variable must be set via setup(5). Once enabled, all FirstBase tools will attempt to load a keyboard map at run time. This keyboard map, named .firstbase-kbmap, is described in keyboard(5). If the map cannot be located, or there is a major error in loading, then an error message is displayed and processing continues using the Basic Input mechanism.
The major win in using Editable Input is the ability to easily correct a piece of data located deep inside a field without having to retype the entire field. In other places where user input is required, corrections to input as it is being typed can be done using the same keystrokes.
Note that each user can control whether EDITINPUT is enabled, and each can have their own keyboard map for customization.
FirstBase User's Guide and Reference Manual