Copyright (C) 2000-2012 |
GNU Info (aalib.info)Getting eventsGetting events ============== Once keyboard is up you should use following function to get the events: int aa_getevent(aa_context *C, int WAIT); if WAIT is set to 1 functions wait for an event otherwise they just peek for an event (and might return AA_NONE). Event can be: 1. ascii code of pressed key (value is lower than 255) 2. one of the following special keys: AA_UP, AA_DOWN, AA_LEFT, AA_RIGHT, AA_BACKSPACE, AA_ESC 3. value higher or equal to AA_UNKNOWN but lower than AA_RELEASE means unknown key. 4. two special events AA_MOUSE and AA_RESIZE (will be explained later) 5. higher value than AA_RELEASE means released key. To get keycode use: `value &= ~AA_RELEASE'. If you don't want to be informed about such strange events and if you want to know just about the keys use: int aa_getkey(aa_context *C, int WAIT); automatically generated by info2www version 1.2.2.9 |