1simulate_keypress(3) Allegro manual simulate_keypress(3)
2
3
4
6 simulate_keypress - Stuffs a key into the keyboard buffer. Allegro game
7 programming library.
8
10 #include <allegro.h>
11
12
13 void simulate_keypress(int key);
14
16 Stuffs a key into the keyboard buffer, just as if the user had pressed
17 it. The parameter is in the same format returned by readkey(). Example:
18
19 simulate_keypress(KEY_SPACE << 8);
20 if (readkey() == (KEY_SPACE << 8))
21 allegro_message("You simulated Alt+Space\n");
22
23
25 install_keyboard(3), simulate_ukeypress(3), keypressed(3), readkey(3)
26
27
28
29Allegro version 4.4.3 simulate_keypress(3)