From cc27d305a2e3724fdde8991dee1770d48d302feb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 16 Nov 2015 03:18:06 +0100 Subject: [PATCH] Restore wxSTC built-in key mappings for non-Mac platforms This was broken by bfdf70d14ad8e1389789e206fb977648376bd47e, so keep one of the changes done there conditional on the platform to avoid changing behaviour for the non-Mac ones. Closes #17251. --- src/stc/ScintillaWX.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index d014546c76..d6df4f2acb 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -1105,7 +1105,14 @@ int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) evt.ShiftDown(), evt.ControlDown(), evt.AltDown(), + // Under Mac, ControlDown() returns the status of Cmd key, + // so we sneak the status of the real Ctrl key via SCI_META + // but we shouldn't be doing this elsewhere. +#ifdef __WXMAC__ evt.RawControlDown() +#else + 0 +#endif ), consumed );