From 18a8a2ced6df890ba67af887c2a64c0611b4d676 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 Jul 2007 20:53:18 +0000 Subject: Make the numeric keypad behave like Vanilla does. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 935 --- textscreen/txt_sdl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'textscreen') diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index a7e08e1d..7a0e3ba8 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -259,7 +259,7 @@ static int TranslateKey(SDL_keysym *sym) case SDLK_PAUSE: return KEY_PAUSE; - case SDLK_KP_EQUALS: return KEY_EQUALS; + case SDLK_EQUALS: return KEY_EQUALS; case SDLK_LSHIFT: case SDLK_RSHIFT: @@ -289,15 +289,19 @@ static int TranslateKey(SDL_keysym *sym) case SDLK_KP8: return KEYP_8; case SDLK_KP9: return KEYP_9; + case SDLK_KP_PERIOD: return KEYP_PERIOD; + case SDLK_KP_MULTIPLY: return KEYP_MULTIPLY; + case SDLK_KP_PLUS: return KEYP_PLUS; + case SDLK_KP_MINUS: return KEYP_MINUS; + case SDLK_KP_DIVIDE: return KEYP_DIVIDE; + case SDLK_KP_EQUALS: return KEYP_EQUALS; + case SDLK_KP_ENTER: return KEYP_ENTER; + case SDLK_HOME: return KEY_HOME; case SDLK_INSERT: return KEY_INS; case SDLK_END: return KEY_END; case SDLK_PAGEUP: return KEY_PGUP; case SDLK_PAGEDOWN: return KEY_PGDN; - case SDLK_KP_MULTIPLY: return KEYP_MULTIPLY; - case SDLK_KP_PLUS: return KEYP_PLUS; - case SDLK_KP_MINUS: return KEYP_MINUS; - case SDLK_KP_DIVIDE: return KEYP_DIVIDE; default: break; } -- cgit v1.2.3