Repository navigation
Refactor winit key handling - #21250
Conversation
|
I basically recorded all the winit events when doing this: #21161 (comment) Linux and Windows behave the same way. Mac has extra ReceivedCharacter events. I figured that the logic is to only send release events on KeyboardInput and send press events on ReceivedCharacter only if the character is printable (see the code comments). |
|
/cc @dorfsmay maybe you can also test this PR |
|
The sticky control key is still there. I checked that I'm on the right branch (checked the line in the files), and also: But, it's not worse, so if this PR fixes other things it's worth merging, and we can investigate the Linux ctrl key further later. |
|
@dorfsmay with this PR, here, I can not reproduce the sticky control key issue. This is what I do:
|
|
Correct that sequence works fine, but this one shows the stickiness of the control key:
If this PR fixes other issues, I think it's worth merging, and we can keep working on the sticky control separately. |
jdm
left a comment
There was a problem hiding this comment.
These changes seem like a reasonable improvement.
|
Changewise looks fine, I may try few on windows once this is landed. |
|
@dorfsmay sadly I cannot reproduce your steps. Works fine here on Ubuntu. |
|
@bors-servo r=jdm |
|
📌 Commit 3c7bb87 has been approved by |
Refactor winit key handling This should improve keys input on Linux and Windows. Should fix #17146 and #21161 Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR. If we land that now, we will hit a regression on Mac, we need a winit update that includes rust-windowing/winit#610. @kwonoj and @atouchet I'd appreciate if you could look at this. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21250) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-css1 |
|
@bors-servo retry |
|
I will make sure to test this on Windows when it's merged. |
|
⚡ Previous build results for android, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only mac-rel-css1... |
|
💔 Test failed - mac-rel-css1 |
|
@bors-servo retry
|
Refactor winit key handling This should improve keys input on Linux and Windows. Should fix #17146 and fix #21161 Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR. If we land that now, we will hit a regression on Mac, we need a winit update that includes rust-windowing/winit#610. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21250) <!-- Reviewable:end -->
|
💔 Test failed - android |
|
@bors-servo retry
|
|
⚡ Previous build results for android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only android... |
This should improve keys input on Linux and Windows. Should fix #17146 and fix #21161 Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR. If we land that now, we will hit a regression on Mac, we need a winit update that includes rust-windowing/winit#610. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21250) <!-- Reviewable:end -->
|
💔 Test failed - android |
|
@bors-servo retry |
|
⚡ Previous build results for android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only android... |
|
☀️ Test successful - android, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This should improve keys input on Linux and Windows.
Should fix #17146 and fix #21161
Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR.
If we land that now, we will hit a regression on Mac, we need a winit update that includes rust-windowing/winit#610.
This change is