HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

8- 1
Chapter 8 User-Defined Keys
Introduction
User-definable keys, also called softkeys or programmable function keys,
are the eight function keys, f1 - f8, that are on HP terminals. There
are nine statements and two functions available in HP Business BASIC/XL
that let you define and use these function keys. You have the following
two options for specifying the actions to be taken after pressing a
user-definable key.
Typing Aid Key -
Pressing a key defined as a typing aid key displays
strings of characters commonly used for editing or data entry. The
attribute field of the function key determines whether the string is
executed locally, transmitted to the host computer, or treated in the
same manner as the alphanumeric keys.
Branch-During-Input -
A branch-during-input key is pressed only when an
input statement or READ FORM statement is being executed. The result of
pressing the branch-during-input key is a program interrupt followed by
resumption of program execution at a point specified in the HP Business
BASIC/XL statement defining the key.
The default values for the user-definable keys are blank labels, local
execution, and the key definition field set to ASCII character 7, BEL.
Pressing a key that has default values rings the terminal's bell.
The type of terminal that you are using is automatically determined when
you enter the HP Business BASIC/XL interpreter. A field in the
configuration file, HPBBCNFG.PUB.SYS, can be set to specify whether the
user-definable keys should be saved when you enter the interpreter so
that the values can be restored upon exit. If you selected this option
and you encounter problems with the interpreter's ability to save and
restore the value of the keys, and you are not using a fully compatible
HP terminal as described in Appendix E, set the Is an HP compatible
terminal entry in the HP Business BASIC/XL configuration file to N. For
more information about setting the HP Business BASIC/XL configuration
file, refer to Appendix C.
When the HP Business BASIC/XL interpreter is a batch job, or when BASIN
or BASLIST have been redirected, branch-during-input keys are still
allowed, but key labels are ignored.
Typing Aid Keys
Typing aid keys set the key definition field to a character string. When
you press the key, the stored string is sent to the input device. The
key's attribute field determines the manner in which the key is
interpreted. For example, consider the situation in which you are in the
interpreter's editor, and the key definition field for key 1 is set to
the value LIST and the key's attribute field is set to T (indicating the
content of the key is to be "transmitted" to the host computer). When
you press key 1, the LIST command is displayed on the terminal and
subsequently executed. The following statements are related to defining
typing aid keys:
* GET KEY - Retrieves the definition of the typing aid keys from a BKEY
file.
* SAVE KEY and RESAVE KEY - Stores the current definitions of the
typing aid key in a BKEY file.