diff --git a/client/displayservers/SDL/sdl.c b/client/displayservers/SDL/sdl.c index ba0d0672..8fb919bd 100644 --- a/client/displayservers/SDL/sdl.c +++ b/client/displayservers/SDL/sdl.c @@ -109,6 +109,20 @@ static bool sdlEventFilter(SDL_Event * event) return true; } + case SDL_KEYDOWN: + { + SDL_Scancode sc = event->key.keysym.scancode; + app_handleKeyPress(sc); + break; + } + + case SDL_KEYUP: + { + SDL_Scancode sc = event->key.keysym.scancode; + app_handleKeyRelease(sc); + break; + } + case SDL_WINDOWEVENT: switch(event->window.event) { diff --git a/client/src/main.c b/client/src/main.c index 4976821e..56e7eb36 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1455,23 +1455,6 @@ int eventFilter(void * userdata, SDL_Event * event) return 0; } - switch(event->type) - { - case SDL_KEYDOWN: - { - SDL_Scancode sc = event->key.keysym.scancode; - app_handleKeyPress(sc); - break; - } - - case SDL_KEYUP: - { - SDL_Scancode sc = event->key.keysym.scancode; - app_handleKeyRelease(sc); - break; - } - } - // consume all events return 0; }