Progress
Language Reference
KEYFUNCTION Function
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).
SYNTAX
expression
A constant, field name, variable name, or expression whose value is an integer key code.
EXAMPLEThis 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 Progress to color msg[i] with the same color used to display messages. Because the initial value of i is 1, msg[i] is the first menu selection. Therefore, the first menu selection is colored MESSAGES.
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.
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |