1
0
Fork 0

Tatsuhiro Nishioka:

Handle number keys on Keypad properly on Mac OS X
This commit is contained in:
torsten 2009-09-08 17:50:14 +00:00 committed by Tim Moore
parent 7e07b57d92
commit a893748d4e

View 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());