diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b26567ad0c..775da10a05 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2061,6 +2061,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
     // FIXME: Include OS X in this code path by passing the key event through
     // QPlatformInputContext::filterEvent().
     if (e->keyType == QEvent::KeyPress && window) {
+        qDebug() << __FUNCTION__<< window << e->key;
         if (QWindowSystemInterface::handleShortcutEvent(window, e->timestamp, e->key, e->modifiers,
             e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount)) {
 #if defined(Q_OS_ANDROID)
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 6c19eab287..8181a7b790 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -53,7 +53,7 @@
 QT_BEGIN_NAMESPACE
 
 // To enable verbose output uncomment below
-//#define DEBUG_QSHORTCUTMAP
+#define DEBUG_QSHORTCUTMAP
 
 /* \internal
     Entry data for QShortcutMap
@@ -164,11 +164,12 @@ int QShortcutMap::addShortcut(QObject *owner, const QKeySequence &key, Qt::Short
 
     QShortcutEntry newEntry(owner, key, context, --(d->currentId), true, matcher);
     const auto it = std::upper_bound(d->sequences.begin(), d->sequences.end(), newEntry);
-    d->sequences.insert(it, newEntry); // Insert sorted
+    auto it_i = d->sequences.insert(it, newEntry); // Insert sorted
 #if defined(DEBUG_QSHORTCUTMAP)
     qDebug().nospace()
         << "QShortcutMap::addShortcut(" << owner << ", "
-        << key << ", " << context << ") = " << d->currentId;
+        << key << ", " << context << ") = " << d->currentId
+        << " at " << (it_i - d->sequences.begin());
 #endif
     return d->currentId;
 }
@@ -326,14 +327,19 @@ QKeySequence::SequenceMatch QShortcutMap::state()
 */
 bool QShortcutMap::tryShortcut(QKeyEvent *e)
 {
+
     Q_D(QShortcutMap);
 
-    if (e->key() == Qt::Key_unknown)
+    qDebug() << __FUNCTION__ << e;
+    if (e->key() == Qt::Key_unknown) {
+        qDebug() << "Key_unknown";
         return false;
+    }
 
     QKeySequence::SequenceMatch previousState = state();
-
-    switch (nextState(e)) {
+     QKeySequence::SequenceMatch  nxs = nextState(e);
+     qDebug() << __FUNCTION__ << previousState << "->" << nxs;
+    switch (nxs) {
     case QKeySequence::NoMatch:
         // In the case of going from a partial match to no match we handled the
         // event, since we already stated that we did for the partial match. But
@@ -366,6 +372,7 @@ bool QShortcutMap::tryShortcut(QKeyEvent *e)
 */
 QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e)
 {
+    qDebug() << __FUNCTION__ << e;
     Q_D(QShortcutMap);
     // Modifiers can NOT be shortcuts...
     if (e->key() >= Qt::Key_Shift &&
@@ -407,6 +414,7 @@ QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e)
 */
 bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const
 {
+    qDebug() << __FUNCTION__ << seq;
     Q_D(const QShortcutMap);
     QShortcutEntry entry(seq); // needed for searching
     const auto itEnd = d->sequences.cend();
@@ -431,6 +439,7 @@ bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const
 */
 QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifiers)
 {
+    qDebug() << __FUNCTION__ << e << ignoredModifiers;
     Q_D(QShortcutMap);
     if (!d->sequences.count())
         return QKeySequence::NoMatch;
@@ -539,8 +548,10 @@ void QShortcutMap::clearSequence(QVector<QKeySequence> &ksl)
 void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl, int ignoredModifiers)
 {
     Q_D(QShortcutMap);
-    QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
+    QList<int> possibleKeys = QKeyMapper::possibleKeys(e);    
     int pkTotal = possibleKeys.count();
+    qDebug() << __FUNCTION__ << e <<  ksl << "ignoredModifiers=" << ignoredModifiers
+             << "pkTotal=" << pkTotal << "possibleKeys=" << possibleKeys << "currentSequences=" << d->currentSequences;
     if (!pkTotal)
         return;
 
@@ -554,8 +565,11 @@ void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl,
         for (int ssNum = 0; ssNum < ssTotal; ++ssNum) {
             int i = (pkNum * ssTotal) + ssNum;
             QKeySequence &curKsl = ksl[i];
+            qDebug() << __FUNCTION__ << "loop pkNum=" <<  pkNum << "ssNum=" << ssNum
+                     << "ssActual=" << ssActual << "i=" << i << "ksl[i]=" << ksl[i];
             if (ssActual) {
                 const QKeySequence &curSeq = d->currentSequences.at(ssNum);
+                qDebug() << __FUNCTION__ << "ssActual/curSeq=" << curSeq;
                 curKsl.setKey(curSeq[0], 0);
                 curKsl.setKey(curSeq[1], 1);
                 curKsl.setKey(curSeq[2], 2);
@@ -565,8 +579,10 @@ void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl,
                 curKsl.setKey(0, 1);
                 curKsl.setKey(0, 2);
                 curKsl.setKey(0, 3);
+                qDebug() << __FUNCTION__ << "!ssActual";
             }
             curKsl.setKey(possibleKeys.at(pkNum) & ~ignoredModifiers, index);
+            qDebug() << __FUNCTION__ << "loop curKsl=" << curKsl;
         }
     }
 }
@@ -628,6 +644,7 @@ int QShortcutMap::translateModifiers(Qt::KeyboardModifiers modifiers)
 QVector<const QShortcutEntry*> QShortcutMap::matches() const
 {
     Q_D(const QShortcutMap);
+    qDebug() << __FUNCTION__ << "identicals=" << d->identicals.size();
     return d->identicals;
 }
 
@@ -636,6 +653,7 @@ QVector<const QShortcutEntry*> QShortcutMap::matches() const
 */
 void QShortcutMap::dispatchEvent(QKeyEvent *e)
 {
+    qDebug() << __FUNCTION__ << e;
     Q_D(QShortcutMap);
     if (!d->identicals.size())
         return;
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 2cecb444c3..d158010b06 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -380,7 +380,9 @@ bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestam
     if (!window)
         window = QGuiApplication::focusWindow();
 
+
     QShortcutMap &shortcutMap = QGuiApplicationPrivate::instance()->shortcutMap;
+    qDebug() << __FUNCTION__<< window << keyCode << "state=" << shortcutMap.state();
     if (shortcutMap.state() == QKeySequence::NoMatch) {
         // Check if the shortcut is overridden by some object in the event delivery path (typically the focus object).
         // If so, we should not look up the shortcut in the shortcut map, but instead deliver the event as a regular
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index af62936a18..a36dbce61c 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -721,7 +721,7 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
         ::ToAscii(VK_SPACE, 0, emptyBuffer, reinterpret_cast<LPWORD>(&buffer), 0);
         ::ToAscii(vk_key, scancode, kbdBuffer, reinterpret_cast<LPWORD>(&buffer), 0);
     }
-    if (QWindowsContext::verbose > 1 && lcQpaEvents().isDebugEnabled()) {
+    if (1) {
         QString message;
         QDebug debug(&message);
         debug <<__FUNCTION__ << " for virtual key = 0x" << hex << vk_key << dec<< '\n';
@@ -734,7 +734,7 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
                 debug << "  deadkey";
             debug << '\n';
         }
-        qCDebug(lcQpaEvents) << message;
+        qDebug() << message;
     }
 }
 
@@ -1240,6 +1240,20 @@ Qt::KeyboardModifiers QWindowsKeyMapper::queryKeyboardModifiers()
     return modifiers;
 }
 
+static void fmtKey(int k, QDebug &d)
+{
+    int m = k & Qt::MODIFIER_MASK;
+    if (m & Qt::CTRL)
+        d << "ctrl ";
+    if (m & Qt::SHIFT)
+        d << "shift ";
+    if (m & Qt::ALT)
+        d << "alt ";
+    k &=  ~Qt::MODIFIER_MASK;
+    Qt::Key ke = (Qt::Key)(k);
+    d << ke << hex << showbase << k << noshowbase << dec;
+}
+
 QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
 {
     QList<int> result;
@@ -1267,7 +1281,15 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
         if (key && key != baseKey && ((keyMods & neededMods) == neededMods))
             result << int(key + (keyMods & ~neededMods));
     }
+    {
+        QDebug d = qDebug();
+        d << '\n' << __FUNCTION__ << e << "returns ";
+        for (int k : result)
+             fmtKey(k ,d);
+        d << '\n';
+    }
 
+    Qt::Key_X;
     return result;
 }
 
