Skip to content
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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

WIP: Use keyboard-types #4026

wants to merge 3 commits into from

Conversation

madsmtm
Copy link
Member

@madsmtm madsmtm commented Dec 2, 2024

Use and re-export keyboard_types::NamedKey, keyboard_types::Code and keyboard_types::Location from the keyboard-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 different serde 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.

@PoignardAzur
Copy link

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.

@madsmtm madsmtm force-pushed the madsmtm/keyboard-types branch 3 times, most recently from 53dce06 to d2c4d1b Compare March 23, 2025 12:15
@@ -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" }
Copy link
Member Author

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.

Copy link
Member

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.

@madsmtm madsmtm marked this pull request as ready for review March 23, 2025 12:16
@madsmtm madsmtm requested a review from daxpedda as a code owner March 23, 2025 12:16
@madsmtm madsmtm requested a review from kchibisov March 23, 2025 12:16
@madsmtm madsmtm force-pushed the madsmtm/keyboard-types branch from 848ffc1 to 02d3456 Compare March 23, 2025 12:20
Copy link
Member

@kchibisov kchibisov left a 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.

@kchibisov kchibisov marked this pull request as draft March 23, 2025 12:24
@madsmtm
Copy link
Member Author

madsmtm commented Mar 23, 2025

I think the concern with certain keys being deprecated is resolved? e.g. Copy key.

Yup, I didn't deprecate those in pyfisch/keyboard-types#49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S - api Design and usability S - enhancement Wouldn't this be the coolest?
Development

Successfully merging this pull request may close these issues.

None yet

3 participants