The behavior of the MLE, when typing, depends on whether it is in insert
or overtype mode, and whether the selection is empty or not. The selection
is defined to be empty when the cursor point is equal to the anchor point.
When a character is typed, it replaces the current selection. If the selection
is empty, the character is viewed as replacing nothing, so the character
is effectively inserted into the text. If one or more characters are selected,
those characters are deleted from the text and replaced by the typed character.
If the MLE is in insert mode, the cursor and anchor points are moved to
immediately follow the newly typed character.
If the MLE is in overtype mode, the cursor is moved to immediately follow
the newly typed character. If there is no character after the cursor (the
new character is at the end of the text) or if the character after the cursor
is a line-break character, the anchor is set to be equal to the cursor point.
In any other case, the anchor is extended one character past the cursor
point, defining the next character as the current selection.
If the typing causes the cursor to go off the screen in any direction, the
display is automatically scrolled. If word-wrap is on, text continues on
a new line, otherwise, the screen is scrolled horizontally.
Scrolling of the text in the window is independent of cursor movement. The
cursor and selection remain unaltered at the same location within the text
during all scrolling but the converse is not true. Any movement of the cursor
causes auto-scrolling, if necessary, to ensure that the text location of
the cursor is visible within the window.
Tabs
Tabs are represented as a single character in the text model, and are displayed
as enough white-space to reach the next tab stop. Tab stops are set at pel
intervals, starting with zero and occurring every n pels, where n is a value
set by the MLM_SETTABSTOP message,
and defaulting to eight times the average character width of the system
font. When a tab is drawn, it uses the number of pels defined by the following
formula:
pelWidth = pelTab - (pelDraw mod pelTab))
where pelTab is the tab interval, in pels, and pelDraw is the pel at which
drawing is to begin.
Return
Return (ASCII newline) causes a hard line-break, and the following text
begins on a new line. A line-break character is inserted in the text, which
is drawn as a few pels of white-space (for selection purposes).
Keystroke commands
For all the following keys, unless otherwise noted, the display is scrolled,
if necessary, to keep the cursor point visible. Where noted, the cursor
setting behaves differently in insert mode than in overtype mode. This
is subject to the boundary conditions noted above.
Del
Causes the contents of the selection region
to be deleted. If the selection region contains no text, it causes the
character to the right of the cursor to be deleted.
Shift+Del
Causes the contents of the selection region to be
cut to the clipboard.
Insert
Toggles
between insert and overtype mode. The MLE ignores the Insert key when it
occurs without a modifier.
Shift+Ins
Causes
the contents of the clipboard to replace the selection region.
Ctrl+Ins
Causes the selection region to be copied to the
clipboard. The selection region is not otherwise affected.
Backspace
Functions similar to Del. If the selection is not
empty, Backspace deletes the selection. If the selection is empty, Backspace
deletes the character to the left of the cursor point. If the MLE is in
overtype mode, the anchor point is set, and the cursor point is moved to
be one character previous in the text. If no such character exists (because
the anchor is set to the beginning of the text) the cursor is set to the
anchor point. If the MLE is in insert mode, the cursor and anchor points
are set, as defined at the start of this chapter.
Down
Arrow
Sets the cursor point to the closest insertion
point on the following line, then sets the anchor point to the cursor point
(insertion mode) or one character following (overtype mode).
Shift+Down
Arrow
Causes the cursor point to be moved to the
closest insertion point on the following line. The anchor point does not
move.
Up Arrow
Sets the
cursor point to the closest insertion point on the preceding line, then
sets the anchor point to the cursor point (insert mode) or one character
following (overtype mode).
Shift+Up
Sets
the cursor point to the closest insertion point on the preceding line. The
anchor point is not moved.
Right Arrow
Sets
the cursor point to the insertion point one character following the cursor
point. The anchor point is set to the cursor point (insert mode) or one
character following (overtype mode).
Shift+Right
Causes the cursor point to be set to the insertion
point immediately following the previous cursor point. The anchor point
is not moved.
Left or Shift+Left
Ctrl+Right
Moves
the cursor point to the insertion point immediately preceding the next word
in the text including trailing spaces, and sets the anchor point to be equal
to (insert mode) or one character following (overtype mode) the cursor point.
The EOL (hard line-break) and tab characters are treated as words.
Ctrl+Shift+Right
Moves only the cursor point in the same way as Ctrl+Right,
but leaves the anchor point unmoved.
Ctrl+Left
Moves
the cursor point to the preceding insertion point at the beginning of a
word, and sets the anchor point to be equal to (insert mode) or one character
following (overtype mode) the cursor point. The EOL (hard line-break) and
tab characters are treated as words.
Ctrl+Shift+Left
Moves only the cursor point in the same way as Ctrl+Left
but leaves the anchor point unmoved.
PageDown or
PageUp
Cause the display to be scrolled one screen
at a time in either direction. This behavior is the same as would be encountered
during a page-down or page-up caused by the scroll-bar.
Ctrl+PageDown
or Ctrl+PageUp
Cause the display to be scrolled
one screen at a time to the right or left respectively. This behavior is
the same as would be encountered during a page-right or page-left caused
by the scroll-bar.
Home
Sets
the cursor point to the insertion point at the beginning of the line containing
the cursor point, and sets the anchor point equal to (insert mode) or one
character following (overtype mode).
Shift+Home
Moves the cursor point to the insertion point at
the beginning of the line. The anchor point is not moved.
End
Sets the anchor point to the insertion point at
the end of the line containing the cursor point. If the last character
on the line is a line-break character, the anchor is positioned just before
it. The cursor is set equal to (insert mode) or one character previous
to (overtype mode) the anchor.
Shift+End
Moves
the cursor point to the insertion point at the end of the line, as above.
The anchor point is not moved.
Ctrl+Home
Moves
the cursor point to the insertion point at the beginning of the document.
The anchor point is set equal to (insert mode) or one character following
it (overtype mode).
Ctrl+End
Moves
the anchor point to the insertion point at the end of the document. The
cursor point is set to be equal to the anchor point (insert mode) or one
character preceding it (overtype mode).
Ctrl+Shift+Home
Moves the cursor point in the same way as Ctrl+Home,
but leaves the anchor point unmoved.
Ctrl+Shift+End
Moves the cursor point in the same way as Ctrl+End,
but leaves the anchor point unmoved.
[Back]
[Next]