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

Input State of Mod Keys get's stuck #296

Closed
RobWalt opened this issue Jul 18, 2024 · 1 comment
Closed

Input State of Mod Keys get's stuck #296

RobWalt opened this issue Jul 18, 2024 · 1 comment

Comments

@RobWalt
Copy link

RobWalt commented Jul 18, 2024

How to reproduce:

  • Adjust the simple.rs example
use bevy::prelude::*;
use bevy_egui::{EguiContexts, EguiPlugin};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(EguiPlugin)
        // Systems that create Egui widgets should be run during the `CoreSet::Update` set,
        // or after the `EguiSet::BeginFrame` system (which belongs to the `CoreSet::PreUpdate` set).
        .add_systems(Update, ui_example_system)
        .run();
}

fn ui_example_system(mut contexts: EguiContexts, mut text: Local<String>) {
    egui::Window::new("Hello").show(contexts.ctx_mut(), |ui| {
        ui.label("world");
        ui.text_edit_singleline(&mut *text);
    });
}
  • Run the example
  • Write something into the text edit field "asdfg"
  • switch focus of windows with any modifier keys (for me it's SuperLeft+Arrow, we have apple users reporting this as well though)
  • click with the mouse into the window to gain back focus
  • try writing in the text edit
  • This won't work since the mod key state is stuck and the textfield thinks you're inputting "Mod+Letter" instead of just "Letter"
@RobWalt
Copy link
Author

RobWalt commented Jul 19, 2024

I temporarily changed the bevy dependency to point to the fix here bevyengine/bevy#14379 and it seems like this also solves this issue in a more detailed way.

I'll close this issue here then and try to help in the bevy repo to get it going.

@RobWalt RobWalt closed this as completed Jul 19, 2024
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

No branches or pull requests

1 participant