|
Size: 1440
Comment: update content - keysym from feedback
|
Size: 1307
Comment: update content - w/ Matt, Sam (in progress)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
| ||Uint32||'''type'''||SDL_KEYDOWN or SDL_KEYUP|| | ||Uint32||'''type'''||the event type; SDL_KEYDOWN or SDL_KEYUP|| |
| Line 13: | Line 13: |
| ||Uint8||'''state'''||SDL_PRESSED or SDL_RELEASED|| | ||Uint8||'''state'''||the state of the key; SDL_PRESSED or SDL_RELEASED|| |
| Line 23: | Line 23: |
| [[SDL_KeyboardEvent]] is a member of the [[SDL_Event]] structure and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported. | [[SDL_KeyboardEvent]] is a member of the [[SDL_Event]] union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported. You would access it through the event's key field. |
| Line 26: | Line 26: |
Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see SDL_EnableKeyRepeat). <<Color2(green,SDL_EnableKeyRepeat does not currently have a page and may not exist in SDL 1.3.)>> |
|
| Line 32: | Line 30: |
| == Related Structures == .[[SDL_Event]] |
|
| Line 33: | Line 34: |
| <<Color2(green,Listed in the old wiki but appear to be absent from 1.3: SDL_EnableKeyRepeat, SDL_EnableUNICODE)>> | .[[SDL_GetKeyboardState]] .[[SDL_GetModState]] |
DRAFT |
SDL_KeyboardEvent
A structure that contains keyboard button event information.
Contents
Data Fields
Uint32 |
type |
the event type; SDL_KEYDOWN or SDL_KEYUP |
Uint32 |
windowID |
the window with keyboard focus, if any |
Uint8 |
state |
the state of the key; SDL_PRESSED or SDL_RELEASED |
Uint8 |
repeat |
non-zero if this is a key repeat |
SDL_Keysym |
keysym |
the SDL_Keysym representing the key that was pressed or released |
Code Examples
You can add your code example here
Remarks
SDL_KeyboardEvent is a member of the SDL_Event union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported. You would access it through the event's key field.
An SDL_KEYDOWN or SDL_KEYUP event occurs whenever a user presses or releases a button on a keyboard. The information on what key was pressed or released is in the keysym member.
Related Enumerations
Related Structures
