keyboard_clear

Clears the state of the given key.

Syntax:

keyboard_clear(key);


Argument Description
key The key to clear.


Returns: N/A


Description

With this function you can clear the current keyboard state, which essentially means that if the key is being held down, it will no longer be recognised until it is released again (which won't generate a keyboard_key_release event either on this occasion) and pressed again.


Example:

keyboard_clear(vk_space);

The above code clears the state of the spacebar.


Back: Keyboard Input
Next: keyboard_key_press
© Copyright YoYo Games Ltd. 2018 All Rights Reserved