summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@theqtcompany.com>2016-03-22 15:50:44 +0100
committerOliver Wolff <oliver.wolff@theqtcompany.com>2016-04-08 05:57:20 +0000
commitfe4fad790ed187bf1d8c5bf61066fe00823fbe7e (patch)
tree57967ead38cc080b70c4ec39f4b6b0f00046602c /src/plugins
parent34e0e908c896126138a95abdeba7456499d0fb68 (diff)
winrt: Fix QKeyEvent::isAutoRepeat
When keeping a key pressed CorePhysicalKeyStatus' RepeatCount stays 1 while WasKeyDown changes from false to true. Thus WasKeyDown should be used to determine the auto repeat status of the key event. Task-number: QTBUG-52055 Change-Id: I7cde6b92473bd5335e85418c2b92cfe8f338975c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 47e68ae0af..e4f7709146 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -885,7 +885,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind
virtualKey,
0,
QString(),
- status.RepeatCount > 1,
+ status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
return S_OK;
@@ -912,7 +912,7 @@ HRESULT QWinRTScreen::onKeyUp(ABI::Windows::UI::Core::ICoreWindow *, ABI::Window
virtualKey,
0,
info.text,
- status.RepeatCount > 1,
+ status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
return S_OK;
@@ -945,7 +945,7 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent
virtualKey,
0,
text,
- status.RepeatCount > 1,
+ status.WasKeyDown,
!status.RepeatCount ? 1 : status.RepeatCount,
false);
d->activeKeys.insert(key, KeyInfo(text, virtualKey));