Script Command: FKEY
FKEY [-bcs] {1-16} [ {label} {text | scriptname} ] || [command]
This command allows the script to configure (or re-configure) the visible function keys (2-9) or buttons (1-16).
The 'label' field is the visible text seen when the function key windows are visible.
The 'text | scriptname' field indicates what action will take place if the function key is engaged.
If a single, whitespace-delimited argument is provided after the button number argument, that is interpreted as a sub-command to FKEY. Currently, the only sub-commands supported are "enable" and "disable" to allow a script to turn off (disable) and turn on (enable) a specified button or function key.
Options:
-b Indicates that the command applies to a 'button', not a 'function key'.
-c Populute the FKEY shell variable with number of times the button or function key has been depressed.
-s Indicates that the 'text' field is a script name, not raw text.
Note: If both the label and text/scriptname arguments are omitted, that tells FKEY to clear the content of the specified button or function key.
Note1: If the -c option is used, then only the first argument which specifies the button or function key number, is expected.
EXAMPLE:
Use of -c option to allow a script to use a button/fkey as a means of input.
# First log the current button-3 hit count...
FKEY -bc 3
set B3HITTOT $FKEY
ECHO "Hit Button-3 to continue"
# Now wait for it to change...
# TOP:
FKEY -bc 3
if $FKEY gt $B3HITTOT goto MORE
goto TOP
# MORE:
ECHO "Got the button hit!"