diff --git a/docs/changes.txt b/docs/changes.txt index b859d07472..0565bca4c1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -629,6 +629,7 @@ wxGTK: - Make items selected from keyboard visible in wxListCtrl (Jonathan Dagresta). - Cosmetic fix for empty wxCheckBoxes display (Chuddah). - Fix crashes in wxFileSystemWatcher implementation (David Hart). +- Fix key events codes when using Wayland (David Hart). wxMSW: diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e979fd123d..41ea787f44 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -810,9 +810,11 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event, // got one key_code = keysymNormalized ? keysymNormalized : keysym; } -#else - key_code = keysym; -#endif + else +#endif // GDK_WINDOWING_X11 + { + key_code = keysym; + } // as explained above, we want to have lower register key codes // normally but for the letter keys we want to have the upper ones