Page Numbers: Yes X: 522 Y: 10.5" First Page: 40
Margins: Top: 1.3" Bottom: 1"
Even Heading:
LAUREL MANUAL
Odd Heading:
4. The Laurel Editor
4.4. Keyboard Commands
There are many other functions available in the Laurel editors. These functions are present in both editors, but the ways in which they are invoked differ substantially. This section first describes how the commands are invoked in either editor and then lists each function in alphabetical order of command character. Those commands invoked by special keys (other than the alphanumeric keys) are listed last. Each command description will give the command letter with which it is invoked in the modal editor first, with the letter(s) with which it is invoked in the modeless editor given in following parentheses. For example, the Time command is described as the T (COM-T) command.
Modal editor command invocation
The modal editor accepts keyboard input in two different modes, command mode and insert mode. At the beginning of a Laurel session, the editor is in command mode, i.e., any character typed will be interpreted as an editor command rather than as type-in. Three commands--A, I, and R--put the editor into insert mode. When in insert mode, a blinking caret appears, and all type-in is treated as characters to be inserted into your message until an ESC or DEL character is struck. At that time, insert mode is terminated and command mode is re-entered.
It is possible in Laurel 6 to invoke screen commands, i.e., those invoked via screen menus and the mouse, even when in insert mode. When the screen command has completed, you will find the caret still blinking, and type-in will continue to be accepted.
Modeless editor command invocation
The modeless editor uses more function keys than does the modal editor. These names of these keys and their positions on the Alto keyboards are given in the following table:
Microswitch (Alto I)ADL (Alto II)
Key name keyboard position keyboard position(s)
DOESC keyESC key
CANCELTop right blankBW key
NEXTMiddle right blankFourth right blank key from the top
COMLower right blankLower left, upper right, and lower right blanks
PASTELF keyLF key
DELDEL keyDEL key
You may find it convenient to write the key names in pencil next to the corresponding keys on your keyboard or to tape these key names onto these keys. If you have a BravoX keyboard, these keys are already labelled properly except for the PASTE key, which is labelled MOVE.
Since there is no special command mode in the modeless editor, a special way of typing command letters is necessary to distinguish commands from ordinary type-in. There is no problem when using one of the special keys, e.g., DO, CANCEL, NEXT, PASTE, or DEL; these are always interpreted as commands. For ordinary characters, this is accomplished with the COM key. The COM key (any one of the COM keys) is used like a SHIFT key--hold it down while you type the specified command letter. When a character is "COM shifted", the modeless editor understands that this character is to be treated as a command rather than as type-in. COM key type-ahead is not supported.
In the modeless editor, there is always an insertion point represented by the blinking caret. After typing in text but before making a new selection, there is no underlined (selected) text. In this case, the selection is considered to be the zero-length selection at the insertion point. Several commands, e.g., the bracket commands (section 4.4.16), that work on the selected text will operate on this null selection when no text is underlined.
4.4.1. A (COM-A) — Append text
The A (COM-A) command places the insertion point (blinking caret) after the selected text in the message composition region.
In the modal editor, this command puts the editor into insert mode. Until ESC or DEL is struck, characters will be inserted at the insertion point as described in section 4.2, Text Input. Also, before typing any characters you may make a secondary selection.
In the modal editor, if the first character typed after the A command is ESC, then the previous text insertion is copied to the insertion point; if the previous command was a deletion, then that deleted text is copied to the insertion point.
In the modeless editor, the insertion point is merely moved to be after the selected text. This command is almost never needed in the modeless editor unless you want to insert after a final CR in a message.
4.4.2. B (COM-B) — Placeholder brackets
The matching black triangles that surround words in the skeleton forms provided by New form, etc., are called placeholder brackets, and the complete word including these triangles is called a placeholder. The B (COM-B) command replaces the selected text with a copy of itself surrounded by these placeholder brackets.
In the modeless editor, the insertion point is placed to the left of the right bracket thus inserted. If there is no underlined text, and the COM-B command is given, then the null text at the insertion point is replaced by these placeholder brackets, the insertion point is between them, and subsequent type-in fills in the placeholder.
The B (COM-B) command is implemented as a replacement of text. A subsequent ESC (DO) will not bracket new text but will instead replace the selected text by the text inserted by the previous B (COM-B) command. This is almost never what you want; use another B (COM-B) to repeat the command instead.
4.4.3. D (DEL, COM-D) — Delete text
The D (DEL, COM-D) command deletes the selected text from the message in the composition region. This text is not yet gone forever; it may be recovered with a U (CANCEL, COM-U) command, an I ESC or A ESC, or a (PASTE) command.
In the modeless editor, this command is generally called the DEL command. COM-D is allowed to preserve the command spellings from the modal editor. See also the description of replace selection, section 4.2.12.
In the modeless editor, a DEL command leaves the caret blinking at the spot from which the selected text was removed. Thus, to replace text, you may select the text to be replaced, type DEL, and then type in the new text. The editor understands that if no target selection is made between the DEL command and subsequent type-in (including shifted selection), then the entire sequence is treated as one replacement for purposes of CANCEL or DO (see sections 4.4.12 and 4.4.13).
In the modeless editor, yet another method of deleting text is available, the CTRL-SHIFT tap. You perform a CTRL-SHIFT tap by quickly depressing and releasing both the CTRL and SHIFT keys together. The selected text is briefly video reversed, and then is deleted. A timeout (the Tap: parameter in the Laurel profile, section 5) is checked; if the CTRL-SHIFT copmbination is held down longer than the timeout, then the CTRL-SHIFT has no effect. The CTRL-SHIFT tap is thus a "left hand delete" key for modeless editor users.
4.4.4. E (COM-E) — Select everything
The E (COM-E) command merely selects the entire message in the composition region. The selection is made at the character level.
In the modeless editor, the selection is a replace selection.
4.4.5. F (COM-F) — Find
The F (COM-F) command initiates the Find screen command. This screen command, when visible, is located on the second line of the lower menu. F (COM-F) will always reset the lower menu so that the Find command occupies that position. When the Find command is visible, it may also be invoked with the mouse, in addition to this method of invoking it through the keyboard.
When the Find command is invoked with RED, or via the F (COM-F) command, it blinks a caret in the following {brackets}. A prompt will appear in the feedback region to remind you of the special characters that may be used in the pattern to be typed into these {brackets}. Once the pattern is typed into these {brackets} and is confirmed, the Find command will search for that pattern in the text following the current selection (or insertion point in the modeless editor if no text is underlined). If a match is found, it is selected and the message is normalized so that this match is visible. In the modeless editor the selection is a replace selection.
The ESC (DO) command (section 4.4.13) does not repeat a Find command. ESC (DO) always repeats the last text modification. To repeat the same Find command, point the cursor at Find and click BLUE. An equivalent of the Bravo Y(es) command is thus ESC (DO) followed by BLUE click of Find. The ESC (DO) does the text replacement, and the BLUE click of Find does the subsequent search.
The patterns accepted by the Find command may be simple or somewhat complex. When the Find command is initiated, a prompt appears in the feedback region giving an abbreviated list of the special characters available and their meanings. You may never need the more complex patterns, but a complete list follows.
Simple character (other than the special characters listed below): Match that character in either upper or lower case.
’ (Single quote): Match the next character in the pattern exactly. Use the single quote to override the upper or lower case feature or to match a special character (including single quote!) All of the special characters are shifted keyboard top row characters (except {, }, and ’). If you wish to match any such character it is a good idea to precede it with a single quote.
#:Match any single character (as in the Alto Executive).
*:Match any sequence of characters (including the trivial sequence of no characters, as in the Alto Executive). The phrase "any sequence" here and in the following means "the shortest such sequence of characters that allows the rest of the pattern to match".
@:Match any single alphanumeric character (letter or digit).
&:Match any sequence of alphanumeric characters (including the trivial sequence of no characters).
!:Match any single non-alphanumeric character (punctuation, blank, special characters, etc.).
~:Match any sequence of non-alphanumeric characters (including the trivial sequence of no characters).
{:Make the resulting selection start at this position, rather than at the start of the matched pattern. This special character is not used to match any characters in the text.
}:Make the resulting selection end at this position, rather than at the end of the matched pattern. This special character is not used to match any characters in the text.
These last two special characters ({ and }) allow you to specify context in a Find command search. If you have ever been bothered by issuing a search command in some editor, for say "and", only to have that editor grin back at you with the last three letters of the word "command" selected, then search context is for you. An isolated word such as "and" is always surrounded by non-alphanumeric characters in text. Consider the pattern:
!{and}!
Each ! must match one non-alphanumeric character in the text. Thus the pattern !and! would match only an isolated "and" together with its surrounding characters. The curly braces are added to the pattern to limit the resulting selection to only the word "and". Note that if you wish to find only lower case "and" words, then you must precede each of the a, n, and d characters by a single quote as in:
!{’a’n’d}!
At most one pair of curly braces may be used in any pattern, and if both are used, then the left curly brace must precede the right curly brace.
By combining curly braces and various special characters in a pattern, quite complicated and precise searches may be specified. However, simple patterns involving no special characters should suffice for most applications of the Find command.
4.4.6. G (COM-G) — Get file
The G (COM-G) command is used to replace the selected text with the contents of a specified file. This editor keyboard command differs from the Get screen command in that only the selected text is replaced, not the entire message.
When you issue the G (COM-G) command, the Get screen command acquires a gray background, the File name {brackets} appear, and a blinking caret appears in those {brackets}. Unlike Laurel 5.1, the brackets are not initialized with the selected text. At this point, you may fill in the name of the file whose text will replace the selected text in the message in the composition region. When the {brackets} are filled in and confirmed, the replacement will take place. In the modeless editor, if no text is selected, then the file contents are merely inserted at the blinking caret.
The same restrictions on length of file and text files only from the Get screen command apply to the G (COM-G) command as well. See section 3.5.1.
4.4.7. I (COM-I) — Insert text
The I (COM-I) command places the insertion point (blinking caret) before the selected text in the message composition region.
In the modal editor, this command puts the editor into insert mode. Until ESC or DEL is struck, characters will be inserted at the insertion point as described in section 4.2, Text Input. Also, before typing any characters, secondary selection is available.
In the modal editor, if the first character struck after the I command is ESC, then the previous text insertion is copied to the insertion point, or if the previous command was a deletion, then that deleted text is copied to the insertion point.
In the modeless editor, the insertion point is merely moved to be before the selected text.
4.4.8. P (COM-P) — Put file
The P (COM-P) command is used to write the selected text onto a specified file. This editor keyboard command differs from the Put screen command in that only the selected text is written, not the entire message.
When you issue the P (COM-P) command, the Put screen command acquires a gray background, the File name {brackets} appear, and a blinking caret appears in those {brackets}. At this point, you may fill in the name of the file to be written with the selected text in the message in the composition region. When the {brackets} are filled in and confirmed, the writing will take place. A confirmation is necessary if the file already exists.
As with the Put screen command, only text is written; for binary files see the Copy command, section 3.5.3.
4.4.9. R (COM-R) — Replace text
The R command in the modal editor is used to replace the selected text by type-in (including shifted selection) or by secondary selection. The R command puts the modal editor into insert mode. See section 4.2, Text Input.
In the modal editor, if the first character struck after the R command is ESC, then the last text inserted or the last text deleted if the last command was D is inserted to replace the selected text.
The (COM-R) command in the modeless editor is provided primarily for compatibility with old modal habits. It is equivalent to the (DEL) command in that it deletes the selected text and blinks the caret at the vacated point. With replace selection available in the modeless editor, the (COM-R) command is never needed.
4.4.10. S (COM-S) — Substitute
The S (COM-S) command initiates the Substitute screen command. This screen command, when visible, is located on the second line of the lower menu. S (COM-S) will always reset the lower menu so that the Substitute command occupies that position. When the Substitute command is visible, it may also be invoked with the mouse, in addition to this method of invoking it through the keyboard. The second line of the lower menu will look like this:
Substitute {new text} for {pattern to be replaced}
Prior to invoking the Substitute command, you should select the range of text in which substitution is to take place. When the Substitute command is invoked with RED, or via the S (COM-S) command, it blinks a caret in the following {brackets}. This should be filled in with the exact text to be written into the message. When this argument is filled in and confirmed, the caret will blink in the for {brackets} and a prompt will appear in the feedback region to remind you of the special characters that may be used in the pattern to be typed into these {brackets}. Once the pattern is typed into these {brackets} and is confirmed, the Substitute command will search for that pattern within the selected text of the message in the composition region. Each sequence of text within the selection that matches the pattern given in the for {brackets} will be replaced by the text in the initial {brackets}. After a pattern match is found and the selected portion replaced by the text in the initial {brackets}, the search for the next match within the text proceeds with the first character following the text just matched. Thus, substitution within newly replaced text cannot occur in a single invocation of the Substitute command.
The special characters and pattern specifications allowed in the for {brackets} of the Substitute command are the same as those allowed by the Find command (section 4.4.5).
The results of the Substitute command are treated as if one large replacement of text over the initial selection had occurred. Thus U (CANCEL) (section 4.4.12) works properly. The ESC (DO) command (section 4.4.13) will repeat this replacement on subsequently selected text. This is generally not what you want. To repeat the same Substitute command, select the text in which you want the Substitute command to operate, point the cursor at Substitute and click BLUE.
Unlike Bravo, the Substitute command cannot be terminated by typing DEL. However, since this command can be completely undone with U (CANCEL) after it has finished, the lack of a premature termination mechanism should not be a hardship.
4.4.11. T (COM-T) — Time insertion
The T (COM-T) command inserts a text representation of the current time into the message in the composition region. This representation is
<day number> <month> <year> <time of day> <time zone> ( <day of week> )
as in 5 May 1981 3:23 pm PDT (Tuesday).
This is the same format as the time inserted into the Date: field by Laurel during message delivery. (This representation is slightly different from that used in the time area at the upper right of the Laurel screen.)
In the modal editor, the time is inserted at the start of the current selection. In the modeless editor, the time is inserted at the insertion point (blinking caret), and the insertion point is moved to just after the newly inserted time. If the selection is a replace selection, then the selection is replaced by the time.
Repeating this command with ESC (DO) will result in the same text, which may not be the most current time.
4.4.12. U (CANCEL, COM-U) — Undo or cancel last text modification
The U (CANCEL) command is used to restore the text in the message composition region to the state it had before the most recent text modification. It should be used when you detect an editing mistake that cannot be corrected simply by backspacing.
U (CANCEL) will only go back one level, and its invocation becomes the next text modification. A sequence of invocations of U (CANCEL) will thus cycle between the state of just before the first U (CANCEL) in the sequence and the state as of before the text modification preceding the first U (CANCEL) in the sequence.
U (CANCEL) in Laurel differs from the U(ndo) command in Bravo in that Laurel ignores any new selection position in performing this operation. The previous text modification is undone exactly in the place where it was originally done. Thus, U (CANCEL) cannot be used to move text. There are several other ways to move text (modal D, select, I ESC, etc.; modeless CTRL-SHIFT-select; DEL, PASTE, etc.).
In the modal editor, the last text modification is easily defined. It is the last deletion, the last insertion, or the last replacement.
In the modeless editor, the last text modification is less easily defined, since there is no command mode giving a convenient demarcation of the boundaries between text modifications. In general, any time a solid underline appears, a text modification boundary is created. It is not necessary to puzzle out exactly what text will be restored when you issue a (CANCEL) command; it nearly always does the right thing. When the (CANCEL) command errs, it generally does so on the side of restoring more text than you might have expected. This is considered to be much less serious than restoring less than you expected.
There are pathological situations when CANCEL may remove as much as it restores. The sequence CANCEL, PASTE will place all the restorable text that Laurel has remembered onto the screen, from which point you may edit the text as you wish.
Note that newly typed-in text erased by backspacing (with BS, CTRL-A or CTRL-W (COM-BS)) is not restorable via U (CANCEL). However, in the modeless editor, text deleted by backspacing before the original insertion point of a text modification is restorable by CANCEL.
4.4.13. ESC (DO) — Repeat last text modification
The last text modification is either an insert, an append, a replace, or a delete. The ESC (DO) command repeats this text modification in the position given by the current selection. The DO key is the same as the ESC key.
In the modal editor, an insert is repeated by inserting the same text before the current selection; an append is repeated by appending the same text after the current selection; a replace is repeated by replacing the current selection by the same text inserted previously; and a delete is repeated by deleting the current selection.
In the modeless editor, a deletion followed immediately by an insertion with no target selection in between those two actions is treated as a replacement. This includes deletion due to replace selection. A subsequent DO command will replace the selected text. Text input that follows a non-replace target selection is always treated as an insertion. A subsequent DO command will insert the same text at the blinking caret. A DO command following a simple deletion (with DEL or CTRL-select) will delete the selected text.
In the modeless editor, the DO command is ignored if no solid underline exists. This prevents an annoying behavior that might occur when the DO key is pressed inadvertently at the end of a type-in sequence. Since modal editor habits die hard, when you switch to the modeless editor, you may find yourself typing these spurious DO’s quite a bit. Laurel will merely ignore them. However, when the mouse is used to place a new selection on the screen, even if the insertion point does not move, then a subsequent DO will take effect.
4.4.14. (NEXT) — Select next placeholder
The NEXT command is available in the modeless editor only. It searches forward in the text from the current selection (or insertion point if there is no selection) for the next placeholder (text surrounded by matching triangles). This next placeholder, if found, is selected with replace selection.
The NEXT command gives a very convenient means for filling out new forms, etc. When you have finished replacing the first placeholder in a form (selected for you by the form initializing command), press NEXT and continue typing the replacement for the next placeholder.
SHIFT-NEXT behaves just like the NEXT command, except that it searches backwards in the message for the previous placeholder. Type-ahead of SHIFT-NEXT is not supported.
4.4.15. (PASTE) — Insert previous deletion
The PASTE command is only available in the modeless editor. (The PASTE key is the same as the LF key.) When invoked, PASTE inserts at the current insertion point the text deleted by the previous text modification. This allows one to move text by selecting it, typing DEL, selecting the new position, and typing PASTE. Repeated PASTE commands are possible; just re-select and type PASTE.
If this method of moving text raises too much anxiety due to the text disappearing during this sequence of commands, then you may wish to use move selection, section 4.2.
For abstruse, yet logical, reasons, a CANCEL given after a PASTE usually results in no change in your text. This is not a disaster; if you wish to remove the text thus pasted, select it and type DEL.
4.4.16. ’, ", <, (, [, {, - (COM-’, COM-", etc.) — Bracket commands
These commands surround the selection with the particular matching pair of symbols suggested by the character typed. For example, [ (COM-[) surrounds the selected text with matching square brackets. The hyphen - (COM--) command is special—it surrounds the selected text with short lines of several hyphens, similar to the way that the Forward command sets off different sections of text.
In the modeless editor, the insertion point is placed to the left of the right bracket thus inserted. If there is no underlined text, and one of these bracket commands is given, then the null text at the insertion point is replaced by the appropriate brackets, the insertion point is between them, and subsequent type-in goes between the bracketing symbols.
These commands are implemented as replacement of text. A subsequent ESC (DO) will not bracket new text but will instead replace the selected text by the text inserted by the previous bracket command. This is almost never what is wanted; use another bracket command instead.
4.4.17. 0, 1, ... 9 (COM-0, COM-1, ... COM-9) — Shortcut screen rearrangement
These commands 0 (COM-0) through 9 (COM-9) were included in Laurel due to a request by a well respected but particularly indolent Laurel user who found the boundary movement boxes on the Laurel screen too bothersome. These commands rearrange the regions on the Laurel screen to various pre-set positions by typing one keyboard command.
By default, 0 (COM-0) resets the screen to roughly the same positions as Laurel uses at start-up, 1 (COM-1) sets the screen so that the table-of-contents region is as large as possible, 2 (COM-2) sets the screen so that the message display region is as large as possible, and 3 (COM-3) sets the screen so that the message composition region is as large as possible. Also by default, 4 (COM-4) through 9 (COM-9) are the same as 0 (COM-0).
The screen arrangements selected by each of these commands may be tailored to your needs by entries in the Laurel profile. See section 5 for more details.