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
Keys now trigger actions on hold, not press #59
Comments
Sorry for the double post, but it just occurred to me that this might be happening on click as well (I.e. enter/space on an item may be generating multiple click events, and it should only generate one on press.) I'm getting lots of crashes, one of which involves multiple state transitions per frame. It occurs to me that this might be caused by multiple clicks generated when enter/space is pressed on an item, thus triggering multiple state transitions per frame when it shouldn't. Thanks for the help so far. |
Hi! There were changes in I've a couple of questions related to your crashes though:
|
Hello, I definitely agree with keys continuing to trigger many actions when held. Backspace should of course clear a text edit field if held down long enough. And I can confirm that focus does indeed repeatedly move when holding down tab in Chrome. But are we absolutely certain that a) Bevy's key repeat rate is tied to that of the OS vs. managed itself and b) that repeat rate is by default equal? Seems to me like there are different expectations for aa UI which needs to debounce key input a bit, vs. for a game that needs to consume it as quickly as possible. To be clear, I'm not experiencing any crashes or panics. Nor am I claiming that I'm seeing multiple events per frame. It just seems like I have to tap tab way more quickly in my game to move focus a single spot, vs. in my OS where I don't have to be quite as fast. And while I respect and appreciate that I can change the key repeat delay, I don't think asking my players to do this will work out. That said, I'm not sure what the best solution here might be. I'll try running my menus on a slower fixed timestep to see if that helps. I'd suggest slowing everything down, but that might make in-game UIs more sluggish too. Focus transitions definitely feel way too twitchy, though. I'd be interested in whether the same is true for sliders as well, though those would be harder for me to test since change events aren't propagated. But I think some sort of debounce somewhere makes sense. |
Yeah, I believe this statement is true. Input events are handled by
Sorry, could you clarify this? Equal to what exactly? Like, whether it's constant and doesn't grow linearly, for instance?
This inconsistency might be related to the way you're handling the inputs. Are you iterating through all the events with |
I've poked this a bit more, and I think there were a few things going on that made this look like a problem. Having fixed the other issues, this appears to have gone away. Closing for now. If I'm still experiencing oddness, I'll open a new issue with more rigorous analysis. Thanks a bunch, and sorry for the noise. |
No worries, glad you were able to figure out what was the problem! |
Hey, not sure if this is on bevy_egui's end or if I'll have to chase it through egui. I updated https://github.com/ndarilek/bevy_egui_a11y to work on Bevy 0.6. Formerly, pressing tab moved focus once. Now it seems to move focus rapidly.
It seems like some of these events are being triggered on hold rather than just on press. Focus should only move once when I press tab.
Thanks!
The text was updated successfully, but these errors were encountered: