Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
38 lines (38 loc) · 1.35 KB

SDL_KeyboardEvent.3

File metadata and controls

38 lines (38 loc) · 1.35 KB
 
Sep 14, 2001
Sep 14, 2001
1
.TH "SDL_KeyboardEvent" "3" "Tue 11 Sep 2001, 22:59" "SDL" "SDL API Reference"
Apr 26, 2001
Apr 26, 2001
2
.SH "NAME"
Dec 29, 2007
Dec 29, 2007
3
SDL_KeyboardEvent \- Keyboard event structure
Apr 26, 2001
Apr 26, 2001
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.SH "STRUCTURE DEFINITION"
.PP
.nf
\f(CWtypedef struct{
Uint8 type;
Uint8 state;
SDL_keysym keysym;
} SDL_KeyboardEvent;\fR
.fi
.PP
.SH "STRUCTURE DATA"
.TP 20
\fBtype\fR
\fBSDL_KEYDOWN\fP or \fBSDL_KEYUP\fP
.TP 20
\fBstate\fR
\fBSDL_PRESSED\fP or \fBSDL_RELEASED\fP
.TP 20
\fBkeysym\fR
Contains key press information
.SH "DESCRIPTION"
.PP
\fBSDL_KeyboardEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_KEYDOWN\fP or \fBSDL_KEYUP\fP is reported\&.
.PP
The \fBtype\fR and \fBstate\fR actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (\fBtype\fR=\fBSDK_KEYUP\fP or \fBstate\fR=\fBSDL_RELEASED\fP) and when a key is pressed (\fBtype\fR=\fBSDL_KEYDOWN\fP or \fBstate\fR=\fBSDL_PRESSED\fP)\&. The information on what key was pressed or released is in the \fI\fBkeysym\fR\fR structure\&.
.PP
.RS
\fBNote:
.PP
Repeating \fBSDL_KEYDOWN\fP events will occur if key repeat is enabled (see \fI\fBSDL_EnableKeyRepeat\fP\fR)\&.
.RE
.SH "SEE ALSO"
.PP
\fI\fBSDL_Event\fR\fR, \fI\fBSDL_keysym\fR\fR, \fI\fBSDL_EnableKeyRepeat\fP\fR, \fI\fBSDL_EnableUNICODE\fP\fR
Sep 14, 2001
Sep 14, 2001
38
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:59