FUNCTION.KEY
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 14 NOV 1989 | 2.X | EXPERT | FUNCTION.KEY |
FUNCTION.KEY
FUNCTION.KEY is an external function that returns the ASCII value of an Advanced Revelation function key code.
scan_code = FUNCTION.KEY(key_code)
Using FUNCTION.KEY
Use FUNCTION.KEY to return a two-value scan code for a specified function key. FUNCTION.KEY provides a programmatic way to return the computer scan code for a particular function key.
FUNCTION.KEY checks the first character in the value of key_code. There are four categories of keys: function keys (F), control function keys (C), shifted function keys (S), and Alt function keys (A). These code formats are illustrated below:
Code | Keystroke |
---|---|
F1 | [F1] |
CF1 | [Ctrl-F1] |
SF1 | [Shift-F1] |
AF1 | [Alt-F1] |
key_code
Use key_code to pass an Advanced Revelation function key code, for which FUNCTION.KEY will then supply the scan code.
Values returned
The two-character scan code sequence for the value of key_code.
Correct Use of FUNCTION.KEY
* The following code finds the scan code of a passed key value DECLARE FUNCTION FUNCTION.KEY DECLARE SUBROUTINE MSG key = "SF1" value = FUNCTION.KEY(key) * MSG won't display CHAR(0), so convert VALUE to displayable characters char1 = SEQ(value[1,1]) char2 = SEQ(value[2,1]) scan_code = char1:" ":char2 MSG("The scan code for ":key:" is ":scan_code,"","","")