DEFINE_KEY Procedure

Programs a function key with a string value or with an action. Also programs a control key with an action (UNIX only).

Usage

Input Parameters


UNIX Users: Under UNIX, if key is not already on PV-WAVE's internal list, you must use the Escape keyword to specify the escape sequence; otherwise, key alone will suffice. The section
Standard Function Keys Under UNIX describes the standard key definitions; however, available function keys and the escape sequences they send vary from keyboard to keyboard.

OpenVMS Users: Under OpenVMS, key names are defined by the Screen Management utility (SMG). The section
Standard OpenVMS Function Keys describes some of these keys. For a complete description, see the OpenVMS RTL Screen Management (SMG$) Manual.

Keywords


NOTE: Most of the following keywords work under UNIX only.

UNIX Users: Under UNIX, the default match key is the up caret "^" key when pressed in column 1.

OpenVMS Users: Under OpenVMS, the default match key is PF1.

Discussion


NOTE: For a discussion of startup files, see the PV-WAVE User's Guide.

Defining Control Keys


UNIX Users: The UNIX stty command can be used to rebind tty control characters or to eliminate them altogether. Refer to the stty man page for more information.

Defining New UNIX Function Keys

Standard Function Keys Under UNIX


NOTE: SunOS users, the function keys R8, R10, R12, and R14 (the arrow buttons) are reserved and cannot be set with DEFINE_KEY. Also, the L1L10 keys are reserved for use by the window manager and cannot be set with DEFINE_KEY.

UNIX Line Editing Keys

Editing Key Function
Control A Move cursor to start of line.
Control B Move cursor left one word.
Control D EOF if current line is empty, EOL otherwise.
Control E Move to end of line.
Control F Move cursor right one word.
Control N Move back one line in recall buffer.
Control R Redraw current line.
Control U Delete from current position to start of line.
Control W Delete previous word.
Backspace, Delete Delete previous character.
Escape I Overstrike/Insert mode toggle.
Escape Delete Delete previous word.
Up Arrow Move back one line in recall buffer.
Down Arrow Move forward one line in recall buffer.
Left Arrow Move left one character.
Right Arrow Move right one character.
R13 Move cursor left one word (Sun keyboard).
R15 Move cursor right one word (Sun keyboard).
text If first character, recall first line containing text; if text is blank, recall previous line.
other characters Insert the character at the current cursor position.

Standard OpenVMS Function Keys

Standard Function Keys Under Windows

Example

See Also





doc@boulder.vni.com
Copyright © 1999, Visual Numerics, Inc. All rights reserved.