Warning, /graphics/krita/3rdparty/ext_qt/0115-Fix-fallback-latin-shortcuts-not-to-be-the-top-prior.patch is written in an unsupported language. File is not indexed.
0001 From ff22a09a02f166d4629e8e5962e4c299355dc794 Mon Sep 17 00:00:00 2001 0002 From: Dmitry Kazakov <dimula73@gmail.com> 0003 Date: Wed, 10 Mar 2021 12:39:16 +0300 0004 Subject: [PATCH 31/47] Fix fallback latin shortcuts not to be the top priority 0005 on Windows 0006 0007 The sortcuts from the current layout should have the topmost 0008 priority, and the latin ones should be used only when there 0009 is noi other option. 0010 --- 0011 src/plugins/platforms/windows/qwindowskeymapper.cpp | 12 +++++++++--- 0012 1 file changed, 9 insertions(+), 3 deletions(-) 0013 0014 diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp 0015 index b392894dd9..68074ad605 100644 0016 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp 0017 +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp 0018 @@ -1402,10 +1402,16 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const 0019 [key] (int k) { return (k & ~Qt::KeyboardModifierMask) == key; }); 0020 // QTBUG-67200: Use the match with the least modifiers (prefer 0021 // Shift+9 over Alt + Shift + 9) resulting in more missing modifiers. 0022 - if (it == result.end()) 0023 - result << matchedKey; 0024 - else if (missingMods > (*it & Qt::KeyboardModifierMask)) 0025 + if (it == result.end()) { 0026 + // The shortcut mapper scans the possible keys in the reverse order, 0027 + // so we should put the fallback latin key into the front of the list 0028 + if (i != 8) 0029 + result.append(matchedKey); 0030 + else 0031 + result.prepend(matchedKey); 0032 + } else if (missingMods > (*it & Qt::KeyboardModifierMask)) { 0033 *it = matchedKey; 0034 + } 0035 } 0036 } 0037 qCDebug(lcQpaEvents) << __FUNCTION__ << e << "nativeVirtualKey=" 0038 -- 0039 2.20.1.windows.1 0040