diff --git a/crates/ui-contract/src/runtime/commands/board.rs b/crates/ui-contract/src/runtime/commands/board.rs index 8f6672ed2..ba0e0ea62 100644 --- a/crates/ui-contract/src/runtime/commands/board.rs +++ b/crates/ui-contract/src/runtime/commands/board.rs @@ -1205,7 +1205,8 @@ pub(crate) fn begin(ctx: &Context) { } } _ => { - let Some(hit) = keys.press(&shortcuts.layout, &shortcut.input, shortcuts.typing && !shortcut.canvas, Some((&mut matcher, time))) else { + let Some(hit) = keys.press(&shortcuts.layout, &shortcut.input, shortcuts.typing && !shortcut.canvas, Some((&mut matcher, time))) + else { continue; }; let (app, instance) = with(ctx, |board| board.target_of(ctx, &hit.command, &board.here)); diff --git a/crates/ui-contract/src/runtime/keys/input.rs b/crates/ui-contract/src/runtime/keys/input.rs index c08780c68..18b731fe4 100644 --- a/crates/ui-contract/src/runtime/keys/input.rs +++ b/crates/ui-contract/src/runtime/keys/input.rs @@ -300,7 +300,13 @@ impl Strip<'_> { PressUse::Press => { batch.presses.push(Press { key, mods, repeat, in_egui: None, release: None, text: None, canvas: false }); if !repeat { - batch.shortcuts.push(Shortcut { input: *input, phase: FirePhase::Press, press: Some(batch.presses.len() - 1), canvas: false, at }); + batch.shortcuts.push(Shortcut { + input: *input, + phase: FirePhase::Press, + press: Some(batch.presses.len() - 1), + canvas: false, + at, + }); } true } diff --git a/crates/ui-shell/tests/it/commands/app_catalog.rs b/crates/ui-shell/tests/it/commands/app_catalog.rs index c726f77cc..ef6ecaff4 100644 --- a/crates/ui-shell/tests/it/commands/app_catalog.rs +++ b/crates/ui-shell/tests/it/commands/app_catalog.rs @@ -109,7 +109,8 @@ fn a_keys_press_and_release_fire_with_the_times_they_arrived_at() { let mut frames = Frames::new(); frames.commands(catalog(1)); frames.idle(3, &mut show); - let times = |frames: &Frames| take_output(&frames.ctx).fired.into_iter().map(|fired| (fired.command.id, fired.phase, fired.time)).collect::>(); + let times = + |frames: &Frames| take_output(&frames.ctx).fired.into_iter().map(|fired| (fired.command.id, fired.phase, fired.time)).collect::>(); let now = |frames: &Frames| frames.ctx.input(|input| input.time); frames.frame(vec![key_press(Key::J, Modifiers::NONE)], &mut show); let pressed = now(&frames);