summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAurelien Lourot <aurelien.lourot@gmail.com>2013-01-10 21:28:37 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-18 11:56:37 (GMT)
commitf45cdeda88796830b3fe71aff7ceb1919d00400d (patch)
treeaec72c51c9c60cc20eafc5649dbf25e1b2ed143e /src
parentcf5442551196c3e7e06e6de85c5f8a198b0ff001 (diff)
downloadQt-f45cdeda88796830b3fe71aff7ceb1919d00400d.zip
Qt-f45cdeda88796830b3fe71aff7ceb1919d00400d.tar.gz
Qt-f45cdeda88796830b3fe71aff7ceb1919d00400d.tar.bz2
QTBUG-15319: fix shortcuts with secondary Xkb layout.
Change-Id: Iadb89137ec017b9dcd4d1588fd582ea46a9d7cc1 Reviewed-by: Aurelien <aurelien.lourot@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 7daa41d..005ff3f 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -282,9 +282,12 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event)
// first, translate key only using lock modifiers (there are no Qt equivalents for these, so we must
// always use them when determining the baseKeySym)
+ // Note: the Xkb group to be used for the conversion keycode->keysym has to be given to
+ // XkbLookupKeySym(). This information is contained in the bits 8 to 15 of xmodifiers.
+ // See https://bugreports.qt-project.org/browse/QTBUG-15319 .
KeySym baseKeySym;
uint consumedModifiers;
- if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (LockMask | qt_num_lock_mask)),
+ if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (0xff00 | LockMask | qt_num_lock_mask)),
&consumedModifiers, &baseKeySym))
return QList<int>();