Wiki Page Content

Revision 1 as of 2010-03-14 19:16:49

Clear message

DRAFT

SDL_GetKeyboardState

Use this function to get a snapshot of the current state of the selected keyboard.

Syntax

Uint8* SDL_GetKeyboardState(int* numkeys)

Function Parameters

numkeys

if non-NULL, receives the length of the returned array

Return Value

An array of key states. Indexes into this array are obtained by using SDL_scancode values.

Code Examples

green

Uint8 *state = SDL_GetKeyboardState(NULL);
if ( state[SDL_SCANCODE_RETURN] ) {
    printf("<RETURN> is pressed.\n");
}

Remarks

You can add useful comments here


CategoryAPI, CategoryKeyboard

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit