simulate_keypress(3alleg4)

simulate_keypress3alleg4

Stuffs a key into the keyboard buffer. allegro game programming library.

Usage

#include <allegro.h>

void simulate_keypress(int key);

Overview

Stuffs a key into the keyboard buffer, just as if the user had pressed it. The parameter is in the same format returned by readkey(). Example:

   simulate_keypress(KEY_SPACE << 8);
   if (readkey() == (KEY_SPACE << 8))
      allegro_message("You simulated Alt+Space\n");

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.