From fec228bb236e690c4c629e4688b62c005298c503 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Sat, 1 Mar 2025 19:33:01 -0600 Subject: [PATCH] Fix issue with `cmd-w` closing window in preview tabs on MacOS (#25878) Closes #25810 Reorders default macOS keymap so that `cmd-w` in `"context": "PromptLibrary"` bindings is not the last binding for `workspace::CloseWindow` and therefore does not get rendered in the app menu or intercepted by MacOS Release Notes: - N/A --- assets/keymaps/default-macos.json | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index b69cc66c32e72116b67089644988b825bfe7c48b..c4cf22570916f09451467ddc705bab4a81f02a23 100644 --- a/assets/keymaps/default-macos.json +++ b/assets/keymaps/default-macos.json @@ -1,4 +1,15 @@ [ + // Moved before Standard macOS bindings so that `cmd-w` is not the last binding for + // `workspace::CloseWindow` and displayed/intercepted by macOS + { + "context": "PromptLibrary", + "use_key_equivalents": true, + "bindings": { + "cmd-n": "prompt_library::NewPrompt", + "cmd-shift-s": "prompt_library::ToggleDefaultPrompt", + "cmd-w": "workspace::CloseWindow" + } + }, // Standard macOS bindings { "use_key_equivalents": true, @@ -270,15 +281,6 @@ "backspace": "assistant2::RemoveSelectedThread" } }, - { - "context": "PromptLibrary", - "use_key_equivalents": true, - "bindings": { - "cmd-n": "prompt_library::NewPrompt", - "cmd-shift-s": "prompt_library::ToggleDefaultPrompt", - "cmd-w": "workspace::CloseWindow" - } - }, { "context": "BufferSearchBar", "use_key_equivalents": true,