diff --git a/examples/widgets/widgets/styles/styles.pro b/examples/widgets/widgets/styles/styles.pro
index 235642f..24d55f7 100644
--- a/examples/widgets/widgets/styles/styles.pro
+++ b/examples/widgets/widgets/styles/styles.pro
@@ -1,5 +1,5 @@
 QT += widgets
-
+CONFIG+=console
 HEADERS       = norwegianwoodstyle.h \
                 widgetgallery.h
 SOURCES       = main.cpp \
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index f429ad2..65c2e83 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1460,15 +1460,19 @@ int QGuiApplication::exec()
 */
 bool QGuiApplication::notify(QObject *object, QEvent *event)
 {
+
 #ifndef QT_NO_SHORTCUT
     if (event->type() == QEvent::KeyPress) {
+        qDebug() << "QGuiApplication::notify"<< "QEvent::KeyPress";
         // Try looking for a Shortcut before sending key events
         QWindow *w = qobject_cast<QWindow *>(object);
         QObject *focus = w ? w->focusObject() : 0;
         if (!focus)
             focus = object;
-        if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, static_cast<QKeyEvent *>(event)))
+        if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, static_cast<QKeyEvent *>(event))) {
+            qDebug() << "QGuiApplication::notify" <<"tryShortcutEvent!";
             return true;
+        }
     }
 #endif
 
@@ -1802,7 +1806,10 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
 
 void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e)
 {
+
     QWindow *window = e->window.data();
+    qDebug() << __FUNCTION__ << window
+             << window->d_func()->blockedByModalWindow;
     modifier_buttons = e->modifiers;
     if (e->nullWindow
 #if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 40e9b97..9bb7a12 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1909,10 +1909,12 @@ bool QWindow::event(QEvent *ev)
         break;
 
     case QEvent::KeyPress:
+        qDebug() <<  "QWindow::event" << this;
         keyPressEvent(static_cast<QKeyEvent *>(ev));
         break;
 
     case QEvent::KeyRelease:
+        qDebug() <<  "QWindow::event" << this;
         keyReleaseEvent(static_cast<QKeyEvent *>(ev));
         break;
 
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 6bcfe01..6df11ed 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -728,6 +728,7 @@ static inline void sendExtendedPressRelease(QWindow *w, int k,
                                             bool autorep = false,
                                             ushort count = 1)
 {
+    qDebug() << __FUNCTION__ << w << k << text;
     QWindowSystemInterface::handleExtendedKeyEvent(w, QEvent::KeyPress, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
     QWindowSystemInterface::handleExtendedKeyEvent(w, QEvent::KeyRelease, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
 }
@@ -739,6 +740,7 @@ static inline void sendExtendedPressRelease(QWindow *w, int k,
 bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
                                           const MSG &msg, LRESULT *result)
 {
+    qDebug() << __FUNCTION__ << widget << msg.message;
     *result = 0;
 
     // Reset layout map when system keyboard layout is changed
@@ -1027,6 +1029,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
             const QString text = uch.isNull() ? QString() : QString(uch);
             const char a = uch.row() ? 0 : uch.cell();
             key_recorder.storeKey(msg.wParam, a, state, text);
+            qDebug() << __FUNCTION__ << "sending press" << receiver << text;
             QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyPress, code,
                                                            Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, text, false);
             result =true;
@@ -1070,6 +1073,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
             // Map SHIFT + Tab to SHIFT + BackTab, QShortcutMap knows about this translation
             if (code == Qt::Key_Tab && (state & Qt::ShiftModifier) == Qt::ShiftModifier)
                 code = Qt::Key_Backtab;
+            qDebug() << __FUNCTION__ << "sending release" << receiver << (rec ? rec->text : QString());
             QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyRelease, code,
                                                            Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers,
                                                            (rec ? rec->text : QString()), false);
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index cdc0b24..86458ee 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1854,7 +1854,7 @@ bool QWindowsWindow::setKeyboardGrabEnabled(bool grab)
         qWarning("%s: No handle", __FUNCTION__);
         return false;
     }
-    qCDebug(lcQpaWindows) << __FUNCTION__ << this << window() << grab;
+    qDebug() << __FUNCTION__ << window() << grab;
 
     QWindowsContext *context = QWindowsContext::instance();
     if (grab) {
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 586068d..e31a142 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2009,6 +2009,7 @@ bool QXcbWindow::setKeyboardGrabEnabled(bool grab)
     xcb_grab_keyboard_reply_t *reply = xcb_grab_keyboard_reply(xcb_connection(), cookie, NULL);
     bool result = !(!reply || reply->status != XCB_GRAB_STATUS_SUCCESS);
     free(reply);
+    qDebug() << "QXcbWindow::setKeyboardGrabEnabled" << window() << grab << "returns" << result;
     return result;
 }
 
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 520fc2d..be99122 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2937,6 +2937,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
             {
                 bool isWidget = receiver->isWidgetType();
                 bool isWindow = receiver->isWindowType();
+                qDebug() << "QApplication::notify" << receiver;
+                if (receiver->inherits("QQuickItem")) {
+                    qDebug() << "QApplication::notifyQQuickItem!!";
+                }
                 bool isGraphicsWidget = false;
 #ifndef QT_NO_GRAPHICSVIEW
                 isGraphicsWidget = !isWidget && !isWindow && qobject_cast<QGraphicsWidget *>(receiver);
@@ -2955,8 +2959,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
                     if (focus)
                         shortcutReceiver = focus;
                 }
-                if (qApp->d_func()->shortcutMap.tryShortcutEvent(shortcutReceiver, key))
+                if (qApp->d_func()->shortcutMap.tryShortcutEvent(shortcutReceiver, key)) {
+                    qDebug() << "QApplication::notify" << "tryShortcutEvent";
                     return true;
+                }
 #endif
                 qt_in_tab_key_event = (key->key() == Qt::Key_Backtab
                         || key->key() == Qt::Key_Tab
@@ -3515,11 +3521,15 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
     }
 
     // send to all receiver event filters
-    if (sendThroughObjectEventFilters(receiver, e))
+    if (sendThroughObjectEventFilters(receiver, e)) {
+//        qDebug() << __FUNCTION__ << "Event filters";
         return true;
+    }
 
-    // deliver the event
+    // deliver the event    
     bool consumed = receiver->event(e);
+    if (e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease)
+        qDebug() << "QApplication::notify" << e << receiver << "consumed=" << consumed;
     e->spont = false;
     return consumed;
 }
