Difference between revisions of "IsFKeyDown"

From SCAR Divi Manual
Jump to: navigation, search
(See Also)
Line 34: Line 34:
 
*[[IsArrowDown]]
 
*[[IsArrowDown]]
 
*[[IsNumpadKeyDown]]
 
*[[IsNumpadKeyDown]]
 +
*[[IsKeyDown]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Keyboard Functions]]
 
[[Category:Keyboard Functions]]

Revision as of 01:51, 5 July 2011

Definition

function IsFKeyDown(Num: Byte): Boolean;

Source Code

function IsFKeyDown(Num: Byte): Boolean;
begin
  Result := False;
  if (Num > 0) and (Num < 13) then
    Result := GetAsyncKeyState(111 + Num) <> 0;
end;

Availability

SCAR Divi 3.00 > Current

Description

Returns true if an F-key specified by Num is being pressed.

Example

begin
  repeat
    Wait(500)
  until IsFKeyDown(8);
  WriteLn('Pressed F8');
end.

See Also