X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8b75e9498c5664d5e960b6161bcb3d2857a0d53..e8cd0e5884f1f77ddc10c70ae6edcd0e308db7c3:/contrib/src/stc/ScintillaWX.cpp diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 05709cb689..796f06e0c8 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -539,7 +539,8 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar defn, vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].sizeZoomed, - IsUnicodeMode(), + CodePage(), + vs.styles[STYLE_DEFAULT].characterSet, wMain); // If the call-tip window would be out of the client // space, adjust so it displays above the text. @@ -760,17 +761,15 @@ void ScintillaWX::DoAddChar(int key) { } -#ifdef __WXMAC__ -int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) { -#else -int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool WXUNUSED(meta), bool* consumed) { -#endif -#if defined(__WXGTK__) || defined(__WXMAC__) - // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK - // TODO: Check this, it shouldn't be true any longer. +int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) +{ + int key = evt.GetKeyCode(); + bool shift = evt.ShiftDown(), + ctrl = evt.ControlDown(), + alt = evt.AltDown(); + if (ctrl && key >= 1 && key <= 26) key += 'A' - 1; -#endif switch (key) { case WXK_DOWN: key = SCK_DOWN; break; @@ -802,7 +801,7 @@ int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool WXUNU } #ifdef __WXMAC__ - if ( meta ) { + if ( evt.MetaDown() ) { // check for a few common Mac Meta-key combos and remap them to Ctrl // for Scintilla switch ( key ) {