summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.h
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-10-12 02:07:39 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-16 15:13:56 +0200
commitaf4284401d2ee5675fe6d06211a0686a5732af23 (patch)
treee41d53ef122166a92a03e3feac7c0e98eeadfca0 /src/plugins/platforms/winrt/qwinrtscreen.h
parent0232fa3979e0e5d8485de94950f514bfd861d22b (diff)
WinRT QPA: Improve key handling
Simplify key handling by providing a cleaner tracking of physical key presses and associated character events. Change-Id: I5aa8990e0b24e101b348c04d1ada2cbcd1b0b6be Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h
index 83f359ce6d..21e50fa10a 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.h
+++ b/src/plugins/platforms/winrt/qwinrtscreen.h
@@ -102,6 +102,7 @@ public:
QSurfaceFormat surfaceFormat() const;
QWinRTInputContext *inputContext() const;
QPlatformCursor *cursor() const;
+ Qt::KeyboardModifiers keyboardModifiers() const;
Qt::ScreenOrientation nativeOrientation() const;
Qt::ScreenOrientation orientation() const;
@@ -123,7 +124,8 @@ private:
// Event handlers
QHash<QEvent::Type, EventRegistrationToken> m_tokens;
- HRESULT onKey(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::IKeyEventArgs *args);
+ HRESULT onKeyDown(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::IKeyEventArgs *args);
+ HRESULT onKeyUp(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::IKeyEventArgs *args);
HRESULT onCharacterReceived(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::ICharacterReceivedEventArgs *args);
HRESULT onPointerEntered(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::IPointerEventArgs *args);
HRESULT onPointerExited(ABI::Windows::UI::Core::ICoreWindow *window, ABI::Windows::UI::Core::IPointerEventArgs *args);
@@ -154,7 +156,9 @@ private:
Qt::ScreenOrientation m_nativeOrientation;
Qt::ScreenOrientation m_orientation;
- QHash<quint32, QString> m_activeKeys;
+#ifndef Q_OS_WINPHONE
+ QHash<quint32, QPair<Qt::Key, QString> > m_activeKeys;
+#endif
QHash<quint32, Pointer> m_pointers;
QHash<quint32, QWindowSystemInterface::TouchPoint> m_touchPoints;
};