Fix handling of accelerators in wxOSX

Check accelerator tables when handling wxEVT_CHAR_HOOK, not
wxEVT_KEY_DOWN, as we don't get the latter at all for some events, e.g.
Cmd-Alt-1 doesn't generate wxEVT_KEY_DOWN (which looks like another bug)
but does generate wxEVT_CHAR_HOOK.

Closes #13937.
This commit is contained in:
Vadim Zeitlin
2021-01-24 20:57:20 +01:00
parent 5f30f79bc8
commit f8d4bba9e7

View File

@@ -2573,7 +2573,7 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
// moved the ordinary key event sending AFTER the accel evaluation // moved the ordinary key event sending AFTER the accel evaluation
#if wxUSE_ACCEL #if wxUSE_ACCEL
if (event.GetEventType() == wxEVT_KEY_DOWN) if (event.GetEventType() == wxEVT_CHAR_HOOK)
{ {
wxWindow *ancestor = this; wxWindow *ancestor = this;
while (ancestor) while (ancestor)