System.IsKeyDown

boolean System.IsKeyDown ( 

number Key )

Example 1

if System.IsKeyDown(13) then
-- The user is holding down the 'enter' key
end

Checks if the 'enter' key is down.

Example 2

-- Check if the left mouse button is down (Virtual Key Code = 1)
bisLeftDown = System.IsKeyDown(1);

if bisLeftDown then
-- The left mouse button is currently pressed
else
-- The left mouse button is NOT currently pressed
end

Checks if the left mouse button is down.

See also:  Related Actions