tips:revmedia:subs10

FUNCTION.KEY

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTFUNCTION.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)

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:

CodeKeystroke
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.

The two-character scan code sequence for the value of key_code.

* 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,"","","")
  • tips/revmedia/subs10.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1