diff --git a/src/ui/keymap.rs b/src/ui/keymap.rs index c2b806bf..3547e302 100644 --- a/src/ui/keymap.rs +++ b/src/ui/keymap.rs @@ -33,6 +33,11 @@ pub fn init(cx: &mut App) { SwitcherAcrossBack, Some("Switcher"), )); + // The palette has nowhere for Tab to go — the arrows walk the list and + // Enter runs it — but Root's focus walker still had somewhere to send it: + // out of the modal, onto whichever chrome tile is behind it, ring and all. + bindings.push(KeyBinding::new("tab", NoAction {}, Some("Palette"))); + bindings.push(KeyBinding::new("shift-tab", NoAction {}, Some("Palette"))); cx.bind_keys(bindings); cx.set_global(BoundKeystrokes(bound_keystrokes(&effective))); diff --git a/src/ui/palette.rs b/src/ui/palette.rs index 5b7a9274..9dbfd769 100644 --- a/src/ui/palette.rs +++ b/src/ui/palette.rs @@ -1137,6 +1137,7 @@ impl Render for PaletteView { .justify_center() .pt(px(120.)) .bg(scrim) + .key_context("Palette") .on_key_down(cx.listener(|this, ev: &gpui::KeyDownEvent, _window, cx| { let ks = &ev.keystroke; if is_edit_gesture(ks) {