GETKEYSTATE

Top  Previous  Next

Syntax

INT = GETKEYSTATE(num as INT)

Description

Returns the asynchronous status of the specified virtual key

Parameters

num - Virtual key code to test

Return value

Return is greater than 0 if the key is currently being held down.

Remarks

On 95/98/ME will not work in a console executable unless there is a message processing loop.

See Also: Appendix

Example usage

IF GETKEYSTATE(0x1B) THEN PRINT "ESC pressed"