HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
f
8-: 2
* SCRATCH KEY - Restores the default key definitions for the terminal.
These statements are defined in chapter 4.
You can define user-definable keys either before or after entering the
interpreter. Consult your terminal reference manual for the method used
to set the fields for your terminal's user-definable keys.
A field in the configuration file can be set to indicate whether you wish
to save the values of the user-definable keys prior to entering the
interpreter.
* If the field in the configuration file is set to indicate that the
user-definable keys are saved when you enter the interpreter or at
the start of a compiled program, then when you execute the first
keys
statement the keys in the terminal is saved. The values of the
user-definable keys are restored to the terminal when you exit the
program.
* If the field in the configuration file is set to indicate that the
values of the user-definable keys are not saved when you enter the
interpreter, then the first KEY command except SAVE KEY causes the
values of the keys to be set to the default values, blank labels,
local, and BEL. Issuing a SAVE KEY command before executing any
keys
statement causes HP Business BASIC/XL to store the current typing aid
key definitions.
Key values are retrieved from a file by issuing a GET KEY command.
However, when you exit HP Business BASIC/XL with the SAVE KEY option in
effect, the previous values are restored as the user-definable key
definitions.
Branch-During-Input Keys
By defining a branch-during-input key you provide a method of altering
program flow from within an input statement. For example, you can write
a help facility that is accessed by pressing a branch-during-input key
while the program is executing an input statement. Statements and
functions used to define the branch-during-input keys are described
below:
* ON KEY and OFF KEY - Activation and deactivation, respectively, of a
single key or set of keys defined as branch-during-input keys.
* ENABLE - Specifies that any key-generated branch in the interrupt
queue is to be processed. If the queue is empty, branch-during-input
keys are processed immediately when pressed.
* DISABLE - Specifies that any key-generated branches are to be added
to the interrupt queue without processing.
* PRESS KEY - Allows the simulation of pressing a branch-during-input
key from within the program.
* CURKEY - A function that returns the number of the last
branch-during-input key pressed.
* RESPONSE - A function that returns how input was terminated,
including which softkey was pressed.
These statements are defined in chapter 4. CURKEY and RESPONSE are
defined in chapter 5.
Branch-during-input keys are active only during program execution and
only when pressed following an input prompt (that is, while INPUT,
TINPUT, ACCEPT, or LINPUT statements execute) and before pressing RETURN.
They are also active during execution of a READ FORM statement. Any
input characters typed between the input prompt and the pressing of the
user-definable key defined as a branch-during-input key are lost. Only
one branch-during-input key can be pressed during a given input
statement.