From af4284401d2ee5675fe6d06211a0686a5732af23 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Sat, 12 Oct 2013 02:07:39 +0300 Subject: 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 Reviewed-by: Oliver Wolff --- src/plugins/platforms/winrt/qwinrtscreen.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h') 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 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 m_activeKeys; +#ifndef Q_OS_WINPHONE + QHash > m_activeKeys; +#endif QHash m_pointers; QHash m_touchPoints; }; -- cgit v1.2.3