From f8d4bba9e7d8e60e396dac2276d6c88ed3db117f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Jan 2021 20:57:20 +0100 Subject: [PATCH] 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. --- src/osx/window_osx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 1b429d8f05..b3609f8026 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -2573,7 +2573,7 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event ) // moved the ordinary key event sending AFTER the accel evaluation #if wxUSE_ACCEL - if (event.GetEventType() == wxEVT_KEY_DOWN) + if (event.GetEventType() == wxEVT_CHAR_HOOK) { wxWindow *ancestor = this; while (ancestor)