Legacy:IsAnyKeyPressed
Jump to navigation
Jump to search
Checks if any key was pressed (eg. if there were keys in the key queue). Returns true if so, and else false.
Usage
boolean IsAnyKeyPressed();
Examples
if (IsAnyKeyPressed())
{
Abort("A key was pressed or left in the key queue!");
}Checks if any key was pressed. If true, aborts with the message a key was pressed.
Notes
- IsAnyKeyPressed() can not receive which key was pressed! Use IsKeyPressed() or GetKey() for that.
- The function does not halt the program like GetKey() does and thus can be used in loops without interruption.
See also
- GetKey()
- IsKeyPressed()
- Abort()