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

Replace Event::Text with Event::Key #404

Merged
merged 10 commits into from
Aug 27, 2023
Merged

Replace Event::Text with Event::Key #404

merged 10 commits into from
Aug 27, 2023

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Aug 23, 2023

This lets widgets get direct access to Winit's new key events and fixes issues conflating text entry with shortcuts or control characters.

See also rust-windowing/winit#3038. This impl directly modifies event.text but we should probably align with Winit.

Edit to clarify: this code sets KeyEvent::Text to None where the text would be non-printable (control codes) or should only be matched as a shortcut (due to usage of Ctrl/Super/Alt keys). This approach may need to be changed.

@dhardy dhardy merged commit f342d7a into master Aug 27, 2023
5 checks passed
@dhardy dhardy mentioned this pull request Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant