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

Add warning to ignore synthetic keyboard presses #3717

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alice-i-cecile
Copy link

This PR adds a more prominent warning about synthetic keyboard events, as a simple stopgap for #3543.

I encountered this when reviewing bevyengine/bevy#13696: the existing docs alone were not clear enough for me to determine that synthetic presses should be ignored.

While I suspect that removing them on the winit end is likely better, this is a simple non-breaking improvement.

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_synthetic: true is currently only used on X11 and Windows, so I can't really give any input on this, tagging @notgull instead; could you review this (and #3543)?

Perhaps the solution is to fix the X11 backend to not emit a the Tab key event on refocus via. Alt+Tab, similarly to the linked bevy PR?

src/event.rs Show resolved Hide resolved
@kchibisov
Copy link
Member

Perhaps the solution is to fix the X11 backend to not emit a the Tab key event on refocus via. Alt+Tab, similarly to the linked bevy PR?

This is just arbitrary. Such event should just be separate, so for folks who really need it, they can use it. And also in a sense that it just shows what scancodes are pressed or something like that.

@madsmtm madsmtm requested a review from notgull June 11, 2024 21:48
@madsmtm madsmtm added DS - windows DS - x11 S - docs Awareness, docs, examples, etc. labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS - windows DS - x11 S - docs Awareness, docs, examples, etc.
Development

Successfully merging this pull request may close these issues.

3 participants