don't swallow command events that are not handled by accels, fixes #12373
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b59cd6c433
commit
b895498c75
@ -2072,18 +2072,21 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
|
|||||||
// eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
|
// eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
|
||||||
wxKeyEvent wxevent2(wxevent) ;
|
wxKeyEvent wxevent2(wxevent) ;
|
||||||
wxevent2.SetEventType(wxEVT_CHAR);
|
wxevent2.SetEventType(wxEVT_CHAR);
|
||||||
GetWXPeer()->OSXHandleKeyEvent(wxevent2);
|
result = GetWXPeer()->OSXHandleKeyEvent(wxevent2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ( !wxevent.CmdDown() )
|
||||||
{
|
{
|
||||||
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
|
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||||
else
|
else
|
||||||
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||||
}
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user