Legacy:IsAnyKeyPressed

From Spherical
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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