Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11events.c @ 4560:95352c671a6e
Added support for keyboard repeat (only tested on Windows so far)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Jul 2010 23:25:24 -0700 |
parents | 4d95152d9e39 |
children | e2d46c5c7483 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11events.c Tue Jul 20 00:57:01 2010 -0700 +++ b/src/video/x11/SDL_x11events.c Tue Jul 20 23:25:24 2010 -0700 @@ -182,7 +182,8 @@ #ifdef DEBUG_XEVENTS printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode); #endif - SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); + /* FIXME: How do we tell if this was a key repeat? */ + SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode], SDL_FALSE); #if 1 if (videodata->key_layout[keycode] == SDLK_UNKNOWN) { int min_keycode, max_keycode; @@ -217,7 +218,7 @@ #ifdef DEBUG_XEVENTS printf("KeyRelease (X11 keycode = 0x%X)\n", xevent.xkey.keycode); #endif - SDL_SendKeyboardKey(SDL_RELEASED, videodata->key_layout[keycode]); + SDL_SendKeyboardKey(SDL_RELEASED, videodata->key_layout[keycode], SDL_FALSE); } break;