diff options
author | Andrey Butirsky <butirsky@gmail.com> | 2021-03-18 17:42:51 +0300 |
---|---|---|
committer | Andrey Butirsky <butirsky@gmail.com> | 2021-04-07 16:15:19 +0000 |
commit | 62e697fd568f6acdae7144a58efa08990eb7d9ab (patch) | |
tree | c4f768ce9c791f6a974a55d31b67e667c91adb03 /src/gui/platform/unix/qxkbcommon_p.h | |
parent | cbdce59cd24861210a01fa9f319607b3a538ebbb (diff) |
fix Alt+` shortcut on non-US layouts
Make it possible for non-letter-keys with Latin 1 symbols (`, !, @ etc.)
to participate in shortcuts also, when the keys generate national
symbols on non-Latin layout.
For example, in Russian layout, "`" key generates cyrillic "ё" letter of
national alphabet, so shortcuts with the key should still work
regardless of the actual layout.
Fixes: QTBUG-90611
Change-Id: Id9a505210ff33a94b82511b88c30ef79f3d03913
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/platform/unix/qxkbcommon_p.h')
-rw-r--r-- | src/gui/platform/unix/qxkbcommon_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/platform/unix/qxkbcommon_p.h b/src/gui/platform/unix/qxkbcommon_p.h index d5fa47d4fe..197268dbc1 100644 --- a/src/gui/platform/unix/qxkbcommon_p.h +++ b/src/gui/platform/unix/qxkbcommon_p.h @@ -94,8 +94,8 @@ public: static void verifyHasLatinLayout(xkb_keymap *keymap); static xkb_keysym_t lookupLatinKeysym(xkb_state *state, xkb_keycode_t keycode); - static bool isLatin(xkb_keysym_t sym) { - return ((sym >= 'a' && sym <= 'z') || (sym >= 'A' && sym <= 'Z')); + static bool isLatin1(xkb_keysym_t sym) { + return sym <= 0xff; } static bool isKeypad(xkb_keysym_t sym) { return sym >= XKB_KEY_KP_Space && sym <= XKB_KEY_KP_9; |