test/checkkeys.c
changeset 9580 d37ef6990bf9
parent 9278 8900afb78a19
child 9581 4da24acfbd90
equal deleted inserted replaced
9579:9a5b4bf6f4d1 9580:d37ef6990bf9
   142     /*SDL_WaitEvent(&event); emscripten does not like waiting*/
   142     /*SDL_WaitEvent(&event); emscripten does not like waiting*/
   143 
   143 
   144     while (SDL_PollEvent(&event)) {
   144     while (SDL_PollEvent(&event)) {
   145         switch (event.type) {
   145         switch (event.type) {
   146         case SDL_KEYDOWN:
   146         case SDL_KEYDOWN:
   147         //case SDL_KEYUP:
   147         case SDL_KEYUP:
   148 		    PrintKey(&event.key.keysym, (event.key.state == SDL_PRESSED) ? SDL_TRUE : SDL_FALSE, (event.key.repeat) ? SDL_TRUE : SDL_FALSE);
   148 		    PrintKey(&event.key.keysym, (event.key.state == SDL_PRESSED) ? SDL_TRUE : SDL_FALSE, (event.key.repeat) ? SDL_TRUE : SDL_FALSE);
   149             break;
   149             break;
   150         case SDL_TEXTINPUT:
   150         case SDL_TEXTINPUT:
   151             PrintText(event.text.text);
   151             PrintText(event.text.text);
   152             break;
   152             break;