Annotated edit history of
SDL_KeyboardEvent(3) version 2, including all changes.
View license author blame.
| Rev |
Author |
# |
Line |
| 2 |
perry |
1 |
SDL_!KeyboardEvent |
| |
|
2 |
!!!SDL_!KeyboardEvent |
| 1 |
perry |
3 |
NAME |
| |
|
4 |
STRUCTURE DEFINITION |
| |
|
5 |
STRUCTURE DATA |
| |
|
6 |
DESCRIPTION |
| |
|
7 |
SEE ALSO |
| |
|
8 |
---- |
| |
|
9 |
!!NAME |
| |
|
10 |
|
| |
|
11 |
|
| 2 |
perry |
12 |
SDL_!KeyboardEvent- Keyboard event structure |
| 1 |
perry |
13 |
!!STRUCTURE DEFINITION |
| |
|
14 |
|
| |
|
15 |
|
| |
|
16 |
typedef struct{ |
| |
|
17 |
Uint8 type; |
| |
|
18 |
Uint8 state; |
| |
|
19 |
SDL_keysym keysym; |
| 2 |
perry |
20 |
} SDL_!KeyboardEvent; |
| 1 |
perry |
21 |
!!STRUCTURE DATA |
| |
|
22 |
|
| |
|
23 |
|
| |
|
24 |
__type SDL_KEYDOWN__ or __SDL_KEYUP__ |
| |
|
25 |
|
| |
|
26 |
|
| |
|
27 |
__state SDL_PRESSED__ or __SDL_RELEASED__ |
| |
|
28 |
|
| |
|
29 |
|
| |
|
30 |
__keysym__ Contains key press information |
| |
|
31 |
!!DESCRIPTION |
| |
|
32 |
|
| |
|
33 |
|
| 2 |
perry |
34 |
__SDL_!KeyboardEvent__ is a member of the __SDL_Event__ |
| 1 |
perry |
35 |
union and is used when an event of type __SDL_KEYDOWN__ |
| |
|
36 |
or __SDL_KEYUP__ is reported. |
| |
|
37 |
|
| |
|
38 |
|
| |
|
39 |
The __type__ and __state__ actually report the same |
| |
|
40 |
information, they just use different values to do it! A |
| |
|
41 |
keyboard event occurs when a key is released |
| |
|
42 |
(__type__=__SDK_KEYUP__ or |
| |
|
43 |
__state__=__SDL_RELEASED__) and when a key is pressed |
| |
|
44 |
(__type__=__SDL_KEYDOWN__ or |
| |
|
45 |
__state__=__SDL_PRESSED__). The information on what |
| |
|
46 |
key was pressed or released is in the __keysym__ |
| |
|
47 |
structure. |
| |
|
48 |
|
| |
|
49 |
|
| |
|
50 |
__Note:__ |
| |
|
51 |
|
| |
|
52 |
|
| |
|
53 |
Repeating __SDL_KEYDOWN__ events will occur if key repeat |
| 2 |
perry |
54 |
is enabled (see __SDL_!EnableKeyRepeat__). |
| 1 |
perry |
55 |
!!SEE ALSO |
| |
|
56 |
|
| |
|
57 |
|
| |
|
58 |
__SDL_Event__, __SDL_keysym__, |
| 2 |
perry |
59 |
__SDL_!EnableKeyRepeat__, |
| 1 |
perry |
60 |
__SDL_EnableUNICODE__ |
| |
|
61 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.