KeyBeenPressed

Description:

baKeyBeenPressed checks whether a key has been pressed since the last time the function was called.

Platforms:

Windows

Usage:

Result = baKeyBeenPressed( Key )

Arguments:

Integer.
Key is the virtual key code of the key to test.

Returns:

Integer.
Returns 1 if Key has been pressed since the last time the function was called, else 0.

Examples:

Director:
KeyBeenPressed = baKeyBeenPressed( 65 ) -- check if the "a" key has been pressed

Authorware:
KeyBeenPressed := baKeyBeenPressed( 65 ) -- check if the "a" key has been pressed
 

Notes:

A list of Virtual Key Codes is supplied. Some of these keys are not available in different versions of Windows.

This function tracks key presses in all applications, not just yours.
 

See also:

baKeyIsDown