keypressed

Tells if there are keypresses waiting in the input buffer.

Description

int keypressed();
Returns TRUE if there are keypresses waiting in the input buffer. You can use this to see if the next call to readkey() is going to block or to simply wait for the user to press a key while you still update the screen possibly drawing some animation. Example:
      while (!keypressed()) {
         /* Show cool animated logo. */
      }
      /* So he skipped our title screen. */
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: