diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 72c18e12..572129a1 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -121,7 +121,8 @@ impl TextureCraftApp { Brightness::Dark | Brightness::MediumDark => craft_theme::Mode::Dark, }; let mut root = RootEnv::new().mode(mode).scale(Scale::new(scale)); - root.tab_toggles_chrome = true; + // Hide UI on another key leaves Tab to focus traversal and the shortcuts + root.tab_toggles_chrome = crate::keymap::shortcut_of(&self.ui.keymap, "ui.hideUi") == Some("Tab"); let app_modal = crate::docking::input_blocked(self, ctx).then_some(ViewportId::ROOT); FrameInput::new(root).commands(CommandInput::new().overrides(command_overrides())).host(Arc::clone(&self.framework_host)).app_modal(app_modal) } diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index a38cdf56..15cb2375 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -464,7 +464,9 @@ pub fn shortcuts(app: &mut TextureCraftApp, ctx: &egui::Context) { if taken { let escape = craft_ui::runtime::keys::escape_mods(ctx).filter(|_| key == Key::Escape); ctx.input_mut(|i| { - let modifiers = escape.map_or(i.modifiers, |held| Modifiers { shift: held.shift, alt: held.alt, ..Modifiers::NONE }); + // A submit's Enter had no Ctrl or Cmd; one that came down later in the pass is not its own + let (shift, alt) = escape.map_or((i.modifiers.shift, i.modifiers.alt), |held| (held.shift, held.alt)); + let modifiers = Modifiers { shift, alt, ..Modifiers::NONE }; i.events.insert(0, egui::Event::Key { key, physical_key: Some(key), pressed: true, repeat: false, modifiers }); }); } diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index 5fcc0b66..4305dd0f 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -110,6 +110,8 @@ pub(crate) fn show(app: &mut TextureCraftApp, ctx: &egui::Context) { dialogs.open(UpdateCheckDialog::new(env!("CARGO_PKG_VERSION"))); } else if !shows && dialogs.is_open::() { dialogs.cancel::(ctx); + // Hidden for the prompt, not dismissed: the outcome shows again after it + let _ = dialogs.take::(); } if let Some(dialog) = dialogs.get_mut::() { dialog.set_status(status);