Skip to content
Browse files

enable the other keypad numerals too

  • Loading branch information...
1 parent cf577da commit 9ada74e2cf735c0613327a9b0f7c2f8596caed0a @lynxlynxlynx lynxlynxlynx committed May 2, 2014
Showing with 9 additions and 0 deletions.
  1. +9 −0 gemrb/plugins/SDLVideo/SDLVideo.cpp
View
9 gemrb/plugins/SDLVideo/SDLVideo.cpp
@@ -214,10 +214,15 @@ int SDLVideoDriver::ProcessEvent(const SDL_Event & event)
// reenable special numpad keys unless numlock is off
if (SDL_GetModState() & KMOD_NUM) {
switch (sym) {
+ case SDLK_KP1: sym = SDLK_1; break;
case SDLK_KP2: sym = SDLK_2; break;
+ case SDLK_KP3: sym = SDLK_3; break;
case SDLK_KP4: sym = SDLK_4; break;
+ // 5 is not special
case SDLK_KP6: sym = SDLK_6; break;
+ case SDLK_KP7: sym = SDLK_7; break;
case SDLK_KP8: sym = SDLK_8; break;
+ case SDLK_KP9: sym = SDLK_9; break;
default: break;
}
}
@@ -226,9 +231,11 @@ int SDLVideoDriver::ProcessEvent(const SDL_Event & event)
key = GEM_ESCAPE;
break;
case SDLK_END:
+ case SDLK_KP1:
key = GEM_END;
break;
case SDLK_HOME:
+ case SDLK_KP7:
key = GEM_HOME;
break;
case SDLK_UP:
@@ -269,9 +276,11 @@ int SDLVideoDriver::ProcessEvent(const SDL_Event & event)
key = GEM_TAB;
break;
case SDLK_PAGEUP:
+ case SDLK_KP9:
key = GEM_PGUP;
break;
case SDLK_PAGEDOWN:
+ case SDLK_KP3:
key = GEM_PGDOWN;
break;
case SDLK_SCROLLOCK:

0 comments on commit 9ada74e

Please sign in to comment.
Something went wrong with that request. Please try again.