keypressed(3alleg)

keypressed3alleg

Tells if there are keypresses waiting in the input buffer. allegro game programming library.

Usage

#include <allegro.h>

int keypressed();

Overview

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. */

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.