mirror of https://github.com/qt/qtbase.git
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>
This commit is contained in:
parent
34e0e908c8
commit
fe4fad790e
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue