Penguin

SDL_!KeyboardEvent?

SDL_!KeyboardEvent?

NAME STRUCTURE DEFINITION STRUCTURE DATA DESCRIPTION SEE ALSO


NAME

SDL_!KeyboardEvent?- Keyboard event structure

STRUCTURE DEFINITION

typedef struct{ Uint8 type; Uint8 state; SDL_keysym keysym; } SDL_!KeyboardEvent?;

STRUCTURE DATA

type SDL_KEYDOWN or SDL_KEYUP

state SDL_PRESSED or SDL_RELEASED

keysym Contains key press information

DESCRIPTION

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.

The type and state actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (typeSDK_KEYUP or stateSDL_RELEASED) and when a key is pressed (typeSDL_KEYDOWN or stateSDL_PRESSED). The information on what key was pressed or released is in the keysym structure.

Note:

Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see SDL_!EnableKeyRepeat?).

SEE ALSO

SDL_Event, SDL_keysym, SDL_!EnableKeyRepeat?, SDL_EnableUNICODE


This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.