svn merge -r39433:39493 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / intern / ghost / intern / GHOST_SystemSDL.cpp
index 6f6679b8d8c02ff8339b00b8f0a3749e9d5fd927..12669ed1a19c4900feb879d4de5b4b2dad2ed286 100755 (executable)
@@ -385,8 +385,26 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
 
                        GHOST_TKey gkey= convertSDLKey(sdl_sub_evt.keysym.scancode);
                        /* note, the sdl_sub_evt.keysym.sym is truncated, for unicode support ghost has to be modified */
 
                        GHOST_TKey gkey= convertSDLKey(sdl_sub_evt.keysym.scancode);
                        /* note, the sdl_sub_evt.keysym.sym is truncated, for unicode support ghost has to be modified */
+                       /* printf("%d\n", sym); */
                        if(sym > 127) {
                        if(sym > 127) {
-                               sym= 0;
+                               switch(sym) {
+                                       case SDLK_KP_DIVIDE: sym= '/'; break;
+                                   case SDLK_KP_MULTIPLY: sym= '*'; break;
+                                   case SDLK_KP_MINUS: sym= '-'; break;
+                                   case SDLK_KP_PLUS: sym= '+'; break;
+                                   case SDLK_KP_1: sym= '1'; break;
+                                   case SDLK_KP_2: sym= '2'; break;
+                                   case SDLK_KP_3: sym= '3'; break;
+                                   case SDLK_KP_4: sym= '4'; break;
+                                   case SDLK_KP_5: sym= '5'; break;
+                                   case SDLK_KP_6: sym= '6'; break;
+                                   case SDLK_KP_7: sym= '7'; break;
+                                   case SDLK_KP_8: sym= '8'; break;
+                                   case SDLK_KP_9: sym= '9'; break;
+                                   case SDLK_KP_0: sym= '0'; break;
+                                   case SDLK_KP_PERIOD: sym= '.'; break;
+                                       default: sym= 0; break;
+                               }
                        }
                        else {
                                if(sdl_sub_evt.keysym.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) {
                        }
                        else {
                                if(sdl_sub_evt.keysym.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) {