Further fixes to work around certain accelerators being missed, and additional command bleed-through.

This commit is contained in:
Areloch 2015-09-27 15:43:47 -05:00
parent 4c13906865
commit 9f7513dc0b

View file

@ -82,33 +82,33 @@ WindowInputGenerator::~WindowInputGenerator()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent ) void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent )
{ {
if( !mInputController || !mFocused ) if (!mInputController || !mFocused)
return; return;
if (inputEvent.action == SI_MAKE && inputEvent.deviceType == KeyboardDeviceType) if (inputEvent.action == SI_MAKE && inputEvent.deviceType == KeyboardDeviceType)
{ {
for( int i = 0; i < mAcceleratorMap.size(); ++i ) for (int i = 0; i < mAcceleratorMap.size(); ++i)
{ {
const AccKeyMap &acc = mAcceleratorMap[i]; const AccKeyMap &acc = mAcceleratorMap[i];
if( acc.modifier & inputEvent.modifier && acc.keyCode == inputEvent.objInst ) if (!mWindow->getKeyboardTranslation() &&
{ (acc.modifier & inputEvent.modifier || (acc.modifier == 0 && inputEvent.modifier == 0))
Con::evaluatef(acc.cmd); && acc.keyCode == inputEvent.objInst)
return; {
} Con::evaluatef(acc.cmd);
} return;
} }
}
}
// Give the ActionMap first shot. // Give the ActionMap first shot.
if (ActionMap::handleEventGlobal(&inputEvent)) if (ActionMap::handleEventGlobal(&inputEvent))
return; return;
if( mInputController->processInputEvent( inputEvent ) ) if (mInputController->processInputEvent(inputEvent))
return; return;
if (mWindow->getKeyboardTranslation()) if (mWindow->getKeyboardTranslation())
{
return; return;
}
// If we get here we failed to process it with anything prior... so let // If we get here we failed to process it with anything prior... so let
// the ActionMap handle it. // the ActionMap handle it.