KEYFUNCTION function
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Evaluates an integer expression (such as 301) and returns a character string that is the function of the key associated with that integer expression (such as GO).
Note: Does
not apply to SpeedScript programming.
Syntax
|
- expression
- A constant, field name, variable name, or expression whose value is an integer key code.
Example
This procedure displays a menu and highlights different selections, depending on which key you press. On the first iteration of the REPEAT block, the COLOR statement tells the AVM to color msg[ix] with the same color used to display messages. Because the initial value of ix is 1, msg[ix] is the first menu selection. Therefore, the first menu selection is colored MESSAGES.
r-keyfn.p
|
See the example in the KEYCODE function reference entry for details on what happens if you press keylabel component.
Notes
- The value returned by the KEYFUNCTION function is affected by any ON statements you use to redefine the value of the key represented by expression.
- If the key represented by expression has no function currently assigned to it or if it has the function of BELL, KEYFUNCTION returns a null value.
- KEYFUNCTION(-2) is equal to ENDKEY.