URL: http://www.firstbasesoftware.com/man/man5/input.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

input - Overview of FirstBase input routine

SYNOPSIS

Description of the FirstBase input routine: features and rules

DESCRIPTION

All user input into any part of FirstBase is monitored. FirstBase interactively checks all keystrokes for acceptable type and entries for acceptable length.

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.

BASIC INPUT

When user input is required, FirstBase displays a series of dots on the screen and positions the cursor at the first dot. These dots represent the maximum number of characters the current program will allow for that particular entry. Note: for entries only one character long, the dot appears under the cursor, and may be hard to see.

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:

--
All real input into the FirstBase system requires a <RETURN> or <ENTER> keystroke at the end of the entered characters to allow the FirstBase programs to 'see' the input. However, signals to programs, such as the ABORT, END, ERASE, HELP, and WORD-ERASE keystrokes (see below) do not need a <RETURN>.

--
If an entry field has a default value, the default is assigned to the entry AS IF THE USER HAD TYPED IT by merely hitting the <RETURN> key. If a default is not allowed, an error message is displayed, and the user is forced to enter something valid.

--
Date data in the FirstBase system must be entered in month day year (MMDDYY) format. The date will be redisplayed in MM/DD/YY format with slashes. Like all entered data, the date is checked for validity by the input routine. For example, enter 051684 for May 16, 1984. FirstBase will redisplay the date as 05/16/84. (However, see DATEDISPLAY in setup(5) for more details).

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.

--
Dollar data in the FirstBase system should be entered without a dollar sign or a decimal point. Furthermore, all trailing zeros should be supplied. The system will echo a properly formatted dollar string. For example, enter 123456 for the dollar amount of 1,234.56.

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.

--
Backspace is achieved using <CONTROL>H, the backarrow or backspace, or the rubout/delete key. All of these erase the most recently entered character.

--
Special keystroke functions allow specific signals to be given. These keystrokes are ABORT, END, ERASE, HELP and WORD-ERASE.

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).

EDITABLE INPUT

The second type of input mechanism supported by FirstBase is the Editable Input mode. This mode uses an extensible set of keyboard commands to allow character, word, and line editing within existing data fields. In other words, intraline editing.

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.

SEE ALSO

firstbase(1), firstbase(5), setup(5), terminals(5), keyboard(5), libscr(3)

FirstBase User's Guide and Reference Manual


URL: http://www.firstbasesoftware.com/man/man5/input.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]