[SDL] SDL_GetKeyState question

Sam Lantinga slouken at devolution.com
Mon Apr 24 21:16:53 PDT 2000


> My code is something like this...

Try this:

Uint8 * keys;
keys = SDL_GetKeyState(NULL);

while (keys[SDLK_ESCAPE] != SDL_PRESSED) {
	//do stuff;
  SDL_PumpEvents();
  keys = SDL_GetKeyState(NULL);	
}

See ya!
	-Sam Lantinga, Lead Programmer, Loki Entertainment Software



More information about the SDL mailing list