Motif Editor Functions

This appendix is an excerpt from the Motif Programmer's Reference, listing editor functions that may be bound to keys. These functions are valid for other Motif text editing windows and text fields as well as for NEdit. The section titled Customizing NEdit has instructions for binding these actions to key and mouse combinations.

backward-character()
Moves the insertion cursor one character to the left.

backward-paragraph(extend)
Moves the insertion cursor to the first non-whitespace character following
the first previous blank line or beginning of the text.  If the insertion
cursor is already at the beginning of a paragraph, moves the insertion cursor
to the beginning of the previous paragraph.

backward-word(extend)
Moves the insertion cursor to the first non-whitespace character after the
first whitespace character to the left or the beginning of the line.  If the
insertion cursor is already at the beginning of a word, moves the insertion
cursor to the beginning of the previous word.

beep()
Causes the terminal to beep.

beginning-of-file(extend)
Moves the insertion cursor to the beginning of the text.

beginning-of-line(extend)
Moves the insertion cursor to the beginning of the line.

clear-selection()
Clears the current selection by replacing each character except
 with a  character.

copy-clipboard()
Copies the current selection to the clipboard.

copy-primary()
Copies the primary selection to the insertion cursor.

copy-to()
If a secondary selection exists, copies the secondary selection to the
insertion cursor.  If no secondary selection exists, copies the primary
selection to the pointer location.

cut-clipboard()
Cuts the current selection to the clipboard.

cut-primary()
Cuts the primary selection to the insertion cursor.

delete-next-character()
If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character following the insertion cursor.

delete-next-word()
If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters following the insertion cursor to the next
space, tab or end of line character.

delete-previous-character()
If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the character of text immediately preceding the insertion
cursor.

delete-previous-word()
If the cursor is inside the selection, deletes the entire selection;
otherwise, deletes the characters preceding the insertion cursor to the next
space, tab or beginning of line character.

delete-selection()
Deletes the current selection.

delete-to-end-of-line()
Deletes the characters following the insertion cursor to the next end of line
character.

delete-to-start-of-line()
Deletes the characters preceding the insertion cursor to the previous
beginning of line character.

deselect-all()
Deselects the current selection.

do-quick-action()
Marks the end of a secondary selection.  Performs the quick action initiated
by the quick-copy-set or quick-cut-set action.

end-of-file(extend)
Moves the insertion cursor to the end of the text.

end-of-line(extend)
Moves the insertion cursor to the end of the line.

extend-adjust()
Selects text from the anchor to the pointer position and deselects text
outside that range.  Moving the pointer over several lines selects text from
the anchor to the end of each line the pointer moves over and up to the
pointer position on the current line.

extend-end()
Moves the insertion cursor to the position of the pointer.

extend-start()
Adjusts the anchor using the balance-beam method.  Selects text from the
anchor to the pointer position and deselects text outside that range.

forward-character()
Moves the insertion cursor one character to the right.

forward-paragraph(extend)
Moves the insertion cursor to the first non-whitespace character following the
next blank line.  If the insertion cursor is already at the beginning of a
paragraph, moves the insertion cursor to the beginning of the next paragraph.

forward-word(extend)
Moves the insertion cursor to the first whitespace character or end of line
following the next non-whitespace character.  If the insertion cursor is
already at the end of a word, moves the insertion cursor to the end of the
next word.

grab-focus()
This key binding performs the action defined in the  XmNselectionArray,
depending on the number of multiple mouse clicks.  The default selection array
ordering is one click to move the insertion cursor to the pointer position,
two clicks to select a word, three clicks to select a line of text, and four
clicks to select all text.  A single click also deselects any selected text
and sets the anchor at the pointer position.

insert-string(string)
If the cursor is inside the selection, deletes the entire selection.  Inserts
string at the insertion cursor.

key-select(direction)
If called with an argument of right, moves the insertion cursor one character
to the right and extends the selection.  If called with an argument of left,
moves the insertion cursor one character to the left and extends the
selection. If called with no argument, extends the selection.

kill-next-character()
If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the character following the insertion cursor and stores the
character in the cut buffer.

kill-next-word()
If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the characters following the insertion cursor to the cut
buffer.

kill-previous-character()
If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the character of text immediately preceding the insertion
cursor and stores the character in the cut buffer.

kill-previous-word()
If the cursor is inside the selection, deletes the entire selection.
Otherwise, kills the characters preceding the insertion cursor to the next
space, tab or beginning of line character, and stores the characters in the
cut buffer.

kill-selection()
Kills the currently selected text and stores the text in the cut buffer.

kill-to-end-of-line()
Kills the characters following the insertion cursor to the next end of line
character and stores the characters in the cut buffer.

kill-to-start-of-line()
Kills the characters preceding the insertion cursor to the next beginning of
line character and stores the characters in the cut buffer.

move-destination()
Moves the insertion cursor to the pointer position without changing any
existing selection.  If no selection exists, also moves the destination cursor
to the pointer position.

move-to()
If a secondary selection exists, cuts the secondary selection to the insertion
cursor.  If no secondary selection exists, cuts the primary selection to the
pointer location.

newline()
If the cursor is inside the selection, deletes the entire selection.  Inserts
a newline at the insertion cursor.

newline-and-backup()
If the cursor is inside the selection, deletes the entire selection.  Inserts
a newline and repositions the insertion cursor to the end of the line before
the newline.

newline-and-indent()
If the cursor is inside the selection, deletes the entire selection.  Inserts
a newline and then the same number of whitespace characters as at the
beginning of the previous line.

next-line()
Moves the insertion cursor to the next line.

next-page(extend)
Moves the insertion cursor forward one page.

page-left()
Scrolls the viewing window left one page of text.

page-right()
Scrolls the viewing window right one page of text.

paste-clipboard()
Pastes the contents of the clipboard before the insertion cursor.

previous-line()
Moves the insertion cursor to the previous line.

previous-page(extend)
Moves the insertion cursor back one page.

process-cancel()
Cancels the current extend-adjust() or secondary-adjust() operation and leaves
the selection state as it was before the operation.

process-down()
Moves the insertion cursor down one line.

process-home()
Moves the insertion cursor to the beginning of the line.

process-return()
Inserts a newline.

process-shift-down()
Moves the insertion cursor down one line.

process-shift-up()
Moves the insertion cursor up one line.

process-tab()
Inserts a tab.

process-up()
Moves the insertion cursor up one line.

quick-copy-set()
Marks the beginning of a secondary selection for use in quick copy.

quick-cut-set()
Marks the beginning of a secondary selection for use in quick cut.

redraw-display()
Redraws the contents of the text window.

scroll-one-line-down()
Scrolls the text area down one line.

scroll-one-line-up()
Scrolls the text area up one line.

secondary-adjust()
Extends the secondary selection to the pointer position.

secondary-notify()
Copies the secondary selection to the destination cursor.

secondary-start()
Marks the beginning of a secondary selection.

select-adjust()
Extends the selection.  The amount of text selected depends on the number of
mouse clicks as specified by the XmNselectionArray resource

select-all()
Selects all text.

select-end()
Extends the selection.  The amount of text selected depends on the number of
mouse clicks, as specified by the XmNselectionArray resource.

select-start()
Marks the beginning of a new selection region.

self-insert()
If the cursor is inside the selection, deletes the entire selection.  Inserts
the character associated with the key pressed at the insertion cursor.

set-anchor()
Resets the anchor point for extended selections.  Resets the destination of
secondary selection actions.

set-insertion-point()
Sets the insertion position.

set-selection-hint()
Sets the text source and location of the selection.

toggle-add-mode()
Toggles the state of Add Mode.

unkill()
Restores last killed text to the position of the insertion cursor.


Other NEdit Topics

Select a topic for more information.


Return to the ACS Consulting home page.

Return to the Software page.


Return to ACS home page.


Please send comments and suggestions to

consult@rpi.edu