diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 8a46e70..37dabae 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -243,12 +243,14 @@ bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestam
 
 
 bool QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) {
+    qDebug() << __FUNCTION__ << t ;
     unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
     return handleKeyEvent(w, time, t, k, mods, text, autorep, count);
 }
 
 bool QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count)
 {
+    qDebug() << __FUNCTION__ << t ;
     if (t == QEvent::KeyPress && QWindowSystemInterface::handleShortcutEvent(tlw, timestamp, k, mods, 0, 0, 0, text, autorep, count))
         return true;
 
@@ -263,6 +265,7 @@ bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *w, QEvent::Type typ
                                                     const QString& text, bool autorep,
                                                     ushort count, bool tryShortcutOverride)
 {
+    qDebug() << __FUNCTION__ << type;
     unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
     return handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers,
                            text, autorep, count, tryShortcutOverride);
@@ -275,6 +278,9 @@ bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestam
                                                     const QString& text, bool autorep,
                                                     ushort count, bool tryShortcutOverride)
 {
+    qDebug() << __FUNCTION__ << type;
+    if (type == QEvent::KeyRelease)
+        qDebug("REL");
     if (tryShortcutOverride && type == QEvent::KeyPress && QWindowSystemInterface::handleShortcutEvent(tlw, timestamp, key, modifiers, 0, 0, 0, text, autorep, count))
         return true;
 
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 4c0b94e..8728937 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -1049,6 +1049,9 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
         // If rec's state doesn't match the current state, something has changed behind our back
         // (Consumed by modal widget is one possibility) So, remove the record from the list
         // This will stop the auto-repeat of the key, should a modifier change, for example
+        qDebug() << "rec=" << rec << "state=" << state;
+        if (rec)
+            qDebug() << "rec->state" << rec->state ;
         if (rec && rec->state != state) {
             key_recorder.findKey(msg.wParam, true);
             rec = 0;
@@ -1132,6 +1135,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
         // If we have a record, it means that the key is already pressed, the state is the same
         // so, we have an auto-repeating key
         if (rec) {
+            qDebug() << "auto-repeating";
             if (code < Qt::Key_Shift || code > Qt::Key_ScrollLock) {
                 QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyRelease, code,
                                                                Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, rec->text, true);
@@ -1153,6 +1157,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
                 return false;
             }
 #endif // !QT_NO_SHORTCUT
+            qDebug() << "store";
             key_recorder.storeKey(msg.wParam, a, state, text);
             QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyPress, code,
                                                            modifiers, scancode, msg.wParam, nModifiers, text, false);
