Programs afunction key with a string value or with an action. Also programs a control key with an action (UNIX only).
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.
NOTE: Most of the following keywords work under UNIX only.
Back_Word (UNIX only) Programs key to move the current cursor position left one word.
Delete_Character (UNIX only) Programs key to delete the character to the left of the current cursor.
Delete_Forward_Char (UNIX only) Programs key to delete the character to the right of the cursor.
Delete_Line (UNIX only) Programs key to delete all characters to the left of the current cursor.
Delete_To_EOL (UNIX only) Programs key to delete all characters to the right of the cursor.
Delete_Word (UNIX only) Programs key to delete the word to the left of the current cursor.
End_of_Line (UNIX only) Programs key to move the current cursor to the end of the line.
Enter_Line (UNIX only) Programs key to enter the current line. This is the action normally performed by the Return key.
Escape (UNIX only) Specifies the escape sequence that corresponds to key. Escape must be a scalar string. See Defining New UNIX Function Keys for further details.
Forward_Character (UNIX only) Programs key to move the current cursor position right one character.
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.
Noecho If nonzero, and value is present, Noecho specifies that when key is pressed, its value should be entered without being echoed. This is useful for defining keys that perform actions such as erasing the screen. If Noecho is specified, the Terminate keyword is assumed to be present and nonzero also.
Previous_Line (UNIX only) Programs key to move back one command in the saved command buffer and make it the current command.
Redraw (UNIX only) Programs key to redraw the current line.
Start_of_Line (UNIX only) Programs key to move the current cursor to the start of the line.
Terminate If nonzero, and value is present, Terminate specifies that pressing key terminates the current input operation after its value is entered. It acts as an implicit Return added to the end of value.
It is convenient to include commonly used key definitions in a startup file so that they will always be available.
NOTE: For a discussion of startup files, see the PV-WAVE User's Guide.
INFO, /Keys
DEFINE_KEY, '^F', /Forward_key
You cannot bind a control key to a string, and some control keys are used for process management. For example, Control-C is usually used to interrupt a UNIX process and Control-Z is used to suspend a UNIX process. These special characters are listed in Chapter 2, Getting Started, in the PV-WAVE User's Guide.
UNIX Users: The UNIXstty
command can be used to rebindtty
control characters or to eliminate them altogether. Refer to thestty
man page for more information.
Escape [28~
, use the command:
DEFINE_KEY, 'HELP', Escape = '\033[28~'
Once a key is defined using the Escape keyword, it is contained in the internal list of function keys. It can then be subsequently re-defined without specifying the escape sequence.
However, if the SETUP_KEYS procedure is used to define the function keys found on the keyboard, it is not necessary to specify the Escape keyword. For example, the following statements program the F2 key on a Sun keyboard to redraw the current line:
SETUP_KEYS DEFINE_KEY, 'F2', /Redraw
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.
INFO, /Keys
with the statement:
DEFINE_KEY, /Terminate, 'F12', 'INFO, /Keys'
INFO, /Keys
command produces output that includes the line:
F12 \03[P = INFO, /Keys Terminate