Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.8.0
-
None
-
Windows 10 winrt x86
-
-
ad0249cc793772a342bf6ced40fb44cd52b2b0e6
Description
On key down the isAutoRepeat value is not being correctly set for character keys.
The sequence of key events looks something like:
[9640] KEY EVENT QKeyEvent(KeyPress, Key_S, text="s") [9640] KEY EVENT QKeyEvent(KeyRelease, Key_S, autorepeat, count=1) [9640] KEY EVENT QKeyEvent(KeyPress, Key_S, text="s") [9640] KEY EVENT QKeyEvent(KeyRelease, Key_S, autorepeat, count=1) [9640] KEY EVENT QKeyEvent(KeyPress, Key_S, text="s") [9640] KEY EVENT QKeyEvent(KeyRelease, Key_S, autorepeat, count=1) [9640] KEY EVENT QKeyEvent(KeyPress, Key_S, text="s") [9640] KEY EVENT QKeyEvent(KeyRelease, Key_S, text="s")
It looks like CorePhysicalKeyStatus.RepeatCount property is not set by Windows for the CharacterReceived event.
However this is correctly set in the KeyDown event, so one potential solution is to extend the KeyInfo struct and store the RepeatCount value in that on onKeyDown(), and then use that value when processing the CharacterReceived event.