Full Command and Function Reference 3-89
KEY
Type: Command
Description: Key Command: Returns a test result and, if a key is pressed, returns the row-column location x
n
m
of that key.
KEY returns a false result (0) to item 2 (stack level 1) until a key is pressed. When a key is
pressed, it returns a true result (1) to item 2 (stack level 1) and x
n m
to item 1 (stack level 2). The
result x
n m
is a two- or three-digit number that identifies the row and column location of the key
just pressed. Unlike WAIT, which returns a three-digit number that identifies alpha and shifted
keyboard planes, KEY returns the row-column location of any key pressed, including !,
…, and ~.
Access: !°L
IN KEY ( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1 Level 2/Item 1 Level 1/Item 2
→
x
n m
1
→
0
See also: WAIT, KEYEVAL
KEYEVAL
Type: Command
Description: Actions the specified key press.
You input a number, in the format
ab.c
, that represents the key. In the number
ab.c:
•
a
is the row coordinate number, where row 1 is the top-most row.
•
b
is the column number, where column 1 is the left-most column.
•
c
is the shift state of the key, i.e., whether it is normal, alpha-shifted, left shifted, etc.
The shift state representations are as follows:
1: Normal function.
2: Left-shift function. 21: Left shift-and-hold function.
3. Right-shift function. 31: Right shift-and-hold function.
4. Alpha-function. 41: Alpha shift-and-hold function.
5. Alpha-left-shift function. 51: Alpha-left-shift-and-hold function.
6. Alpha-right-shift function. 61: Alpha-right-shift-and-hold function.
The sign of the input controls whether USER mode key assignments are used. Positive inputs
specify the USER mode key definition. Negative inputs specify the default system keyboard.
Access: …µ
KEYEVAL
Input/Output:
Level 1/Argument 1 Level 1/Item 1
nn.n
→
Example: Turn the calculator off using a command.
Command:
KEYEVAL(101.3)
Result: The calculator is turned off.
→KEYTIME
Type: Command
Description: This command is provided for compatibility with earlier calculators, but does nothing on the
hp49g+/hp48gII.
KEYTIME→
Type: Command
Description: This command is provided for compatibility with earlier calculators, but does nothing on the
hp49g+/hp48gII.