SAS Component Language Dictionary |
Returns the number of the last function key that was pressed from
the application window
-
keynum
-
contains the number of the function
key that was pressed from the application window, or 0 if ENTER was pressed.
Type: Numeric
The returned value is the ordinal position
of the key definition in the KEYS window. In order for this function to work,
you must have a window variable or text in the DISPLAY window.
To retrieve the name of the last function key pressed
by a user, use FKEYNAME.
LASTKEY is used in conjunction with CONTROL ENTER, ALWAYS,
and ALLCMDS. LASTKEY does not retrieve the number of a function key that has
a global command assigned to it.
Return the number of the last function
key that a user pressed. (This example requires a window with at least one
window variable.)
INIT:
control enter;
return;
MAIN:
keynum=lastkey();
if (keynum ne 0) then
put 'Last function key is ' keynum;
else
put 'Last function key is not defined
or the ENTER key was pressed';
return;
FKEYNAME
GETFKEY
SETFKEY
CONTROL
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.