Possible fix for #29436: issue with external numpad, that is generating unknown
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 2 Dec 2011 19:29:42 +0000 (19:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 2 Dec 2011 19:29:42 +0000 (19:29 +0000)
key events. Disable using these as "key modifier".

source/blender/windowmanager/intern/wm_event_system.c

index 5d48a3c7a7ff817cf7c734cc0e8534ee8207f4f9..9d8f68115cf5b8a25a38c5714eeb417e9c9cf498 100644 (file)
@@ -2667,6 +2667,11 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                           key we don't want the key modifier */
                        if(event.keymodifier == event.type)
                                event.keymodifier= 0;
+                       /* this case happened with an external numpad, it's not really clear
+                          why, but it's also impossible to map a key modifier to an unknwon
+                          key, so it shouldn't harm */
+                       if(event.keymodifier == UNKNOWNKEY)
+                               event.keymodifier= 0;
                        
                        /* if test_break set, it catches this. XXX Keep global for now? */
                        if(event.type==ESCKEY)