keypressed - Man Page

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


#include <allegro.h>

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

See Also

install_keyboard(3), readkey(3), ureadkey(3), clear_keybuf(3), simulate_keypress(3), simulate_ukeypress(3)

Referenced By

clear_keybuf(3), ex12bit(3), ex3buf(3), ex3d(3), exaccel(3), exalpha(3), exblend(3), excolmap(3), exdbuf(3), exflame(3), exflip(3), exjoy(3), exkeys(3), exlights(3), exmidi(3), exmouse(3), expal(3), exquat(3), exrotscl(3), exscale(3), exscroll(3), exshade(3), exspline(3), exsprite(3), exstream(3), exswitch(3), extimer(3), extrans(3), exunicod(3), exupdate(3), exxfade(3), exzbuf(3), install_keyboard(3), install_keyboard_hooks(3), readkey(3), simulate_keypress(3), simulate_ukeypress(3), ureadkey(3).

version 4.4.3 Allegro manual