Workaround for Ctrl-A giving a keycode of 1 in EVT_KEY_DOWN on wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-10-04 20:46:47 +00:00
parent 32c988a34d
commit 39178e3bdf
2 changed files with 12 additions and 0 deletions

View File

@@ -428,6 +428,12 @@ void ScintillaWX::DoAddChar(char ch) {
}
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) {
#ifdef __WXGTK__
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK...
if (ctrl && key >= 1 && key <= 26)
key += 'A' - 1;
#endif
switch (key) {
case WXK_DOWN: key = SCK_DOWN; break;
case WXK_UP: key = SCK_UP; break;