exkeys - Man Page
How to get input from the keyboard in different ways. Allegro game programming library.
Synopsis
#include <allegro.h>
Example exkeys
Description
This program demonstrates how to access the keyboard. The first part shows the basic use of readkey(). The second part shows how to extract the ASCII value. Next come the scan codes. The fourth test detects modifier keys like alt or shift. The fifth test requires some focus to be passed. The final step shows how to use the global key array to read simultaneous key presses. The last method to detect key presses are keyboard callbacks. This is demonstrated by installing a keyboard callback, which marks all pressed keys by drawing to a grid.
See Also
END_OF_FUNCTION(3), END_OF_MAIN(3), LOCK_FUNCTION(3), SCREEN_H(3), SCREEN_W(3), acquire_screen(3), allegro_error(3), allegro_init(3), allegro_message(3), blit(3), clear_keybuf(3), clear_to_color(3), desktop_palette(3), font(3), install_keyboard(3), install_timer(3), key(3), key_shifts(3), keyboard_lowlevel_callback(3), keypressed(3), makecol(3), readkey(3), rectfill(3), release_screen(3), rest(3), scancode_to_name(3), screen(3), set_gfx_mode(3), set_palette(3), textout_ex(3), textprintf_centre_ex(3), textprintf_ex(3), ureadkey(3), usprintf(3), ustrzncpy(3)
Referenced By
END_OF_FUNCTION(3), keyboard_lowlevel_callback(3), key_shifts(3), LOCK_FUNCTION(3), rectfill(3), scancode_to_name(3), ureadkey(3), usprintf(3), ustrzncpy(3).