-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Use keyboard-types
#4026
base: master
Are you sure you want to change the base?
WIP: Use keyboard-types
#4026
Conversation
Looking forward to seeing this merged! Currently Blitz is using some custom code to convert between Winit events and keyboard_type events. I expect to do the same thing in Masonry. |
53dce06
to
d2c4d1b
Compare
@@ -79,6 +86,7 @@ cfg_aliases = "0.2.1" | |||
bitflags = "2" | |||
cursor-icon = "1.1.0" | |||
dpi = { version = "0.1.1", path = "dpi" } | |||
keyboard-types = { git = "https://github.com/pyfisch/keyboard-types.git", branch = "main" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is now ready to be reviewed, though note that v0.8 isn't released yet, so we shouldn't merge it before it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we certainly should, so I've converted to draft for now.
848ffc1
to
02d3456
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the concern with certain keys being deprecated is resolved? e.g. Copy
key.
If it's true, then it's probably fine.
Yup, I didn't deprecate those in pyfisch/keyboard-types#49. |
Use and re-export
keyboard_types::NamedKey
,keyboard_types::Code
andkeyboard_types::Location
from thekeyboard-types
crate.Unsure what the best way to re-export these is, we might for example want
#[doc(inline)]
?I haven't used
keyboard_types::Modifiers
yet, since that has a differentserde
implementation, which is kind of an ABI break and might be hard for downstream to handle, see #4018 (comment).Part of #2394. See also pyfisch/keyboard-types#60.