diff options
Diffstat (limited to 'src/platformsupport/input/xkbcommon/qxkbcommon.cpp')
-rw-r--r-- | src/platformsupport/input/xkbcommon/qxkbcommon.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp index b713c19447..9aa8f10c57 100644 --- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp +++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp @@ -554,6 +554,12 @@ static int keysymToQtKey_internal(xkb_keysym_t keysym, Qt::KeyboardModifiers mod auto it = std::lower_bound(KeyTbl.cbegin(), KeyTbl.cend(), searchKey); if (it != KeyTbl.end() && !(searchKey < *it)) qtKey = it->qt; + + // translate Super/Hyper keys to Meta if we're using them as the MetaModifier + if (superAsMeta && (qtKey == Qt::Key_Super_L || qtKey == Qt::Key_Super_R)) + qtKey = Qt::Key_Meta; + if (hyperAsMeta && (qtKey == Qt::Key_Hyper_L || qtKey == Qt::Key_Hyper_R)) + qtKey = Qt::Key_Meta; } if (qtKey) @@ -582,12 +588,6 @@ static int keysymToQtKey_internal(xkb_keysym_t keysym, Qt::KeyboardModifiers mod } } - // translate Super/Hyper keys to Meta if we're using them as the MetaModifier - if (superAsMeta && (qtKey == Qt::Key_Super_L || qtKey == Qt::Key_Super_R)) - qtKey = Qt::Key_Meta; - if (hyperAsMeta && (qtKey == Qt::Key_Hyper_L || qtKey == Qt::Key_Hyper_R)) - qtKey = Qt::Key_Meta; - return qtKey; } |