Difference between revisions of "IsFKeyDown"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function IsFKeyDown(Num: Byte): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Returns true ...")
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
 
function IsFKeyDown(Num: Byte): Boolean;
 
function IsFKeyDown(Num: Byte): Boolean;
 +
</source>
 +
 +
===Source Code===
 +
<source lang="scar">
 +
function IsFKeyDown(Num: Byte): Boolean;
 +
begin
 +
  Result := False;
 +
  if (Num > 0) and (Num < 13) then
 +
    Result := GetAsyncKeyState(111 + Num) <> 0;
 +
end;
 
</source>
 
</source>
  
 
==Availability==
 
==Availability==
SCAR Divi 3.00 > Current
+
SCAR Divi 3.00 > 3.34
  
 
==Description==
 
==Description==
Line 20: Line 30:
 
</source>
 
</source>
  
[[Category:Functions]]
+
==See Also==
[[Category:Keyboard Functions]]
+
*[[IsFunctionKeyDown]]
 +
*[[IsArrowDown]]
 +
*[[IsNumpadKeyDown]]
 +
*[[IsKeyDown]]
 +
 
 +
[[Category:Deprecated Functions]]

Latest revision as of 15:10, 10 November 2012

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 > 3.34

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