Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor winit key handling #21250
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 |
dorfsmay
commented
Jul 26, 2018
|
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:
|
dorfsmay
commented
Jul 27, 2018
|
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. |
|
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 |
|
|
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 -->
|
|
|
@bors-servo retry |
|
I will make sure to test this on Windows when it's merged. |
|
|
|
|
|
@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 -->
|
|
|
@bors-servo retry
|
|
|
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 -->
|
|
|
@bors-servo retry |
|
|
|
|
paulrouget commentedJul 26, 2018
•
edited by atouchet
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