From 1652687d34d8e663c53c456b45cf0040570d870d Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Fri, 30 Jun 2023 09:50:36 +0200 Subject: [PATCH] QXkbCommon::isLatin1 : Add a lower bound of Latin1 The range of the Latin1 key is from 0x20 to 0xff in both xkb_keysym and Qt::Key. Task-number: QTBUG-113387 Task-number: QTBUG-74479 Pick-to: 6.6 6.5 6.2 Change-Id: I2eaba3129bead9526910f716c211f637804ab592 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/platform/unix/qxkbcommon_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/platform/unix/qxkbcommon_p.h b/src/gui/platform/unix/qxkbcommon_p.h index d27f965a81..8e6613d2b5 100644 --- a/src/gui/platform/unix/qxkbcommon_p.h +++ b/src/gui/platform/unix/qxkbcommon_p.h @@ -60,7 +60,7 @@ public: static xkb_keysym_t lookupLatinKeysym(xkb_state *state, xkb_keycode_t keycode); static bool isLatin1(xkb_keysym_t sym) { - return sym <= 0xff; + return sym >= 0x20 && sym <= 0xff; } static bool isKeypad(xkb_keysym_t sym) { return sym >= XKB_KEY_KP_Space && sym <= XKB_KEY_KP_9;