Windows: Add Key_Backtab as possible key combination for Shift+Tab
In windows Backtab key event always comes as "Shift+Backtab". So in order for Backtab key to be recognized as a shortcut sequence, we also consider Backtab without shift modifier a possibility. Fixes: QTBUG-94890 Change-Id: I20a7b404b57d8df5bea23765257a178f2e098ed0 Pick-to: 6.8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
f2ce68d8f3
commit
4d9f99c4ea
@ -1354,6 +1354,11 @@ QList<QKeyCombination> QWindowsKeyMapper::possibleKeyCombinations(const QKeyEven
|
||||
return result;
|
||||
}
|
||||
|
||||
// If Key_Tab+Shift is pressed we add Key_Backtab without
|
||||
// shift modifier as a possible combination too
|
||||
if (baseKey == Qt::Key_Tab && (keyMods & Qt::ShiftModifier))
|
||||
result << (Qt::Key_Backtab | (keyMods & ~Qt::ShiftModifier));
|
||||
|
||||
// The base key is _always_ valid, of course
|
||||
result << QKeyCombination::fromCombined(int(baseKey) + int(keyMods));
|
||||
|
||||
|
@ -102,6 +102,8 @@ void ShortcutTester::setupLayout()
|
||||
Qt::ControlModifier | Qt::Key_BracketRight,
|
||||
Qt::ShiftModifier | Qt::Key_F3,
|
||||
Qt::ControlModifier | Qt::Key_F3,
|
||||
Qt::Key_Backtab,
|
||||
Qt::ShiftModifier | Qt::Key_Backtab,
|
||||
};
|
||||
|
||||
for (const auto k : keys3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user