int fm_getAsyncKeyStateF(int vkey)
The return value specifies whether the key was pressed since the last call to a member of the getAsyncKeyState family of functions, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState.
getAsyncKeyStateF also checks if the window is currently active. If not, all keys will be seen as "up" (that is; not pressed).
Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to getAsyncKeyState.
%ffp ctl(10): PUSHBUTTON, Text="Hold down the CTRL key" "and click me", Pos=(250, 50), Size=(150, 15) OnCtl(n): { int r; if (n == 10 && e == FME_CLICKED) { if (getAsyncKeyStateF(VK_CONTROL) < 0) Info ("The Control Key was just pressed."); else ErrorOk ("You didn't press the Control Key."); } return false; }