@@ -89,6 +89,8 @@ private Q_SLOTS:
89 void tapWhileTouching();
89 void tapWhileTouching();
90 void multipleHomeKeys();
90 void multipleHomeKeys();
92+ void keyComboInvolvingHome();
92 void repeatedSuperPress();
94 void repeatedSuperPress();
@@ -197,6 +199,38 @@ void WindowInputMonitorTest::touchTapTouch()
197 QCOMPARE(activatedSpy.count(), expectedActivatedCount);
199 QCOMPARE(activatedSpy.count(), expectedActivatedCount);
202+void WindowInputMonitorTest::keyComboInvolvingHome()
204+ WindowInputMonitor homeKeyWatcher(m_fakeTimerFactory->create(this), new FakeElapsedTimer);
205+ QSignalSpy activatedSpy(&homeKeyWatcher, &WindowInputMonitor::homeKeyActivated);
206+ QVERIFY(activatedSpy.isValid());
210+ QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_Super_L, Qt::NoModifier);
211+ homeKeyWatcher.update(&keyEvent);
216+ QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier);
217+ homeKeyWatcher.update(&keyEvent);
221+ QKeyEvent keyEvent(QEvent::KeyRelease, Qt::Key_A, Qt::NoModifier);
222+ homeKeyWatcher.update(&keyEvent);
226+ QKeyEvent keyEvent(QEvent::KeyRelease, Qt::Key_Super_L, Qt::NoModifier);
227+ homeKeyWatcher.update(&keyEvent);
231+ QCOMPARE(activatedSpy.count(), 0);
200void WindowInputMonitorTest::tapWhileTouching()
234void WindowInputMonitorTest::tapWhileTouching()
202 WindowInputMonitor homeKeyWatcher(m_fakeTimerFactory->create(this), new FakeElapsedTimer);
236 WindowInputMonitor homeKeyWatcher(m_fakeTimerFactory->create(this), new FakeElapsedTimer);