Function sdl2_sys::SDL_GetKeyboardState
source · [−]Expand description
\brief Get a snapshot of the current state of the keyboard.
\param numkeys if non-NULL, receives the length of the returned array.
\return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
\b Example:
\code
const Uint8 *state = SDL_GetKeyboardState(NULL);
if ( state[SDL_SCANCODE_RETURN] ) {
printf(“