1SDL_KeyboardEvent(3)           SDL API Reference          SDL_KeyboardEvent(3)
2
3
4

NAME

6       SDL_KeyboardEvent- Keyboard event structure
7

STRUCTURE DEFINITION

9       typedef struct{
10         Uint8 type;
11         Uint8 state;
12         SDL_keysym keysym;
13       } SDL_KeyboardEvent;
14

STRUCTURE DATA

16       type                SDL_KEYDOWN or SDL_KEYUP
17
18       state               SDL_PRESSED or SDL_RELEASED
19
20       keysym              Contains key press information
21

DESCRIPTION

23       SDL_KeyboardEvent  is  a member of the SDL_Event union and is used when
24       an event of type SDL_KEYDOWN or SDL_KEYUP is reported.
25
26       The type and state actually report the same information, they just  use
27       different  values  to  do  it!  A  keyboard  event occurs when a key is
28       released (type=SDK_KEYUP or  state=SDL_RELEASED)  and  when  a  key  is
29       pressed  (type=SDL_KEYDOWN  or  state=SDL_PRESSED).  The information on
30       what key was pressed or released is in the keysym structure.
31
32              Note:
33
34              Repeating SDL_KEYDOWN events will occur if key repeat is enabled
35              (see SDL_EnableKeyRepeat).
36

SEE ALSO

38       SDL_Event, SDL_keysym, SDL_EnableKeyRepeat, SDL_EnableUNICODE
39
40
41
42SDL                         Tue 11 Sep 2001, 22:59        SDL_KeyboardEvent(3)
Impressum