Update to keyboard-types 0.8#940
Merged
waywardmonkeys merged 2 commits intoMay 5, 2025
Merged
Conversation
waywardmonkeys
commented
Apr 29, 2025
| WinitKeyCode::SuperLeft => Code::Super, | ||
| WinitKeyCode::SuperRight => Code::Super, | ||
| WinitKeyCode::SuperLeft => Code::MetaLeft, | ||
| WinitKeyCode::SuperRight => Code::MetaRight, |
Contributor
Author
There was a problem hiding this comment.
@madsmtm This part is the main part that I'm sure about here.
Contributor
There was a problem hiding this comment.
I think it's correct. Note that WinitKeyCode::Meta isn't actually emitted in Winit v0.30.x as far as I know.
See also rust-windowing/winit#4018.
2febd8e to
0fb3cec
Compare
madsmtm
reviewed
Apr 29, 2025
With W3C specs, I think we should be mapping meta / super differently than we were before. This will change again with winit 0.31 where the names of those keys on the winit side will have changed. (And also, much of this particular mapping won't be necessary.) The bulk of this change is that in `keyboard-types` 0.8, the `Key` enumeration has changed to have a separate enumeration for `NamedKey` values.
4b65b0f to
ebba863
Compare
Co-authored-by: Mads Marquart <mads@marquart.dk>
ebba863 to
189d528
Compare
xorgy
approved these changes
May 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With W3C specs, I think we should be mapping meta / super differently than we were before. This will change again with winit 0.31 where the names of those keys on the winit side will have changed. (And also, much of this particular mapping won't be necessary.)
The bulk of this change is that in
keyboard-types0.8, theKeyenumeration has changed to have a separate enumeration forNamedKeyvalues.