]> git.mxchange.org Git - flightgear.git/commitdiff
Tatsuhiro Nishioka:
authortorsten <torsten>
Tue, 8 Sep 2009 17:50:14 +0000 (17:50 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 9 Sep 2009 06:56:32 +0000 (08:56 +0200)
Handle number keys on Keypad properly on Mac OS X

src/Main/FGEventHandler.cxx

index e4d1d104308c8cb478b9d7280256286276822d52..d6be62054e365fd9704147a01678a43ba014d6e4 100644 (file)
@@ -271,9 +271,14 @@ void FGEventHandler::handleKey(const osgGA::GUIEventAdapter& ea, int& key,
     std::map<int, int>::iterator numPadIter = numlockKeyMap.find(key);
 
     if (numPadIter != numlockKeyMap.end()) {
+#ifdef __APPLE__
+        // Num Lock is always true on Mac
+        key = numPadIter->second;
+#else
         if (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_NUM_LOCK) {
             key = numPadIter->second;
         }
+#endif
     }
 
     modifiers = osgToFGModifiers(ea.getModKeyMask());