diff options
author | Andrey Butirsky <butirsky@gmail.com> | 2023-03-30 11:07:04 +0000 |
---|---|---|
committer | Andrey Butirsky <butirsky@gmail.com> | 2023-04-20 09:34:37 +0000 |
commit | d76e1d9cbdd62912e5129d2736da8e1ca80db2e4 (patch) | |
tree | 748a6781a2ecdcf2359121feb4dd851b52a340b9 /src/gui/platform | |
parent | 298c9509129cf039a1da75d5682cbe273a341590 (diff) |
qxkbcommon: Amend comment for Qt::Key upper-case transformation
This should make it clear enough that the issue here is a quirk of
Qt::Key and not something otherwise special about case-change affecting
whether a character is in Latin-1 (for all that this is the root cause
of the quirk in Qt::Key).
Pick-to: 6.5
Change-Id: I80fa6b78a0d0c431401a3fea18edf6149de08b92
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/platform')
-rw-r--r-- | src/gui/platform/unix/qxkbcommon.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/platform/unix/qxkbcommon.cpp b/src/gui/platform/unix/qxkbcommon.cpp index cbc40ff118..d254aeecdc 100644 --- a/src/gui/platform/unix/qxkbcommon.cpp +++ b/src/gui/platform/unix/qxkbcommon.cpp @@ -510,13 +510,13 @@ static int keysymToQtKey_internal(xkb_keysym_t keysym, Qt::KeyboardModifiers mod // numeric keypad keys qtKey = Qt::Key_0 + (keysym - XKB_KEY_KP_0); } else if (QXkbCommon::isLatin1(keysym)) { - // Upper-case first, since Qt::Keys are defined in terms of their - // upper-case versions. + // Most Qt::Key values are determined by their upper-case version, + // where this is in the Latin-1 repertoire. So start with that: qtKey = QXkbCommon::qxkbcommon_xkb_keysym_to_upper(keysym); - // Upper-casing a Latin1 character might move it out of Latin1 range, - // for example U+00B5 MICRO SIGN, which upper-case equivalent is - // U+039C GREEK CAPITAL LETTER MU. If that's the case, then map the - // original lower-case character. + // However, Key_mu and Key_ydiaeresis are U+00B5 MICRO SIGN and + // U+00FF LATIN SMALL LETTER Y WITH DIAERESIS, both lower-case, + // with upper-case forms outside Latin-1, so use them as they are + // since they're the Qt::Key values. if (!QXkbCommon::isLatin1(qtKey)) qtKey = keysym; } else { |