ArcBasicDocs

KeyHit

Number of times a key was pressed since last checked.

KeyHit ( scancode )

Parameters

scancode
the key's number or name, such as KEY_SPACE.

Description

Gives back how many times a key has been pressed since the last time you asked about that key, and starts counting again from 0. Use it for things that should happen once per press, such as jumping, firing or pausing: If KeyHit(KEY_SPACE) Then Jump().

See also