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