IsNumpadKeyDown
From SCAR Divi Manual
Definition
function IsNumpadKeyDown(Key: Byte): Boolean;
Source Code
function IsNumpadKeyDown(Key: Byte): Boolean; var pKey: Byte; begin if Key < 10 then pKey := 96 + Key else case Key of 10: pKey := VK_NUMLOCK; else Exit(False); end; Result := (pKey < 11) and (GetAsyncKeyState(pKey) <> 0); end;
Availability
SCAR Divi 3.00 > Current
Description
Returns true if a numpad key specified by Key was pressed.
Keys
- 0-9: Numpad keys 0 to 9
- 10: Numlock
Example
begin repeat Wait(500) until IsNumpadKeyDown(2); WriteLn('Pressed numpad key 2'); end.