summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorThomas Sondergaard <ts@medical-insight.com>2010-02-08 16:19:54 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-08 16:19:54 (GMT)
commit1042478921b5b3e7a4e9713d9f7778bd10654463 (patch)
tree5a6b7f427df11f100aad50e931c1bc052e72ae3c /src/gui/kernel
parentfebca287b4b357240246f7149075ee3917f6c20c (diff)
downloadQt-1042478921b5b3e7a4e9713d9f7778bd10654463.zip
Qt-1042478921b5b3e7a4e9713d9f7778bd10654463.tar.gz
Qt-1042478921b5b3e7a4e9713d9f7778bd10654463.tar.bz2
Handle Shift+Tab correctly on X11.
This fixes incorrect handling of Shift+Tab keysyms. Most typically Shift+Tab generates Shift+ISO_Left_Tab, but VNC clients generate Shift+Tab in accordance with the RFB specification. Merge-request: 458 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 70574e7..4e6c847 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -360,6 +360,13 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;
@@ -448,6 +455,13 @@ QList<int> QKeyMapperPrivate::possibleKeysCore(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;