From cc2ebe14074a19c58848e0037633598fe231b667 Mon Sep 17 00:00:00 2001 From: Saketh <126517689+SAKETH11111@users.noreply.github.com> Date: Mon, 27 Apr 2026 04:27:26 -0500 Subject: [PATCH] terminal: Bind Alt+F4 to Close Window in the terminal keymap (#53091) Closes #52774 ## Summary - Bind Windows `Alt+F4` to `workspace::CloseWindow` in the `Terminal` keymap context - Add a regression test covering the built-in Windows terminal keymap entry ## Why When the integrated terminal is focused, `Alt+F4` should close the window instead of falling through to terminal keystroke handling. Handling this in the Windows `Terminal` keymap keeps the fix aligned with the rest of the terminal shortcut overrides. ## Validation - `cargo test -p settings windows_terminal_keymap_closes_window_on_alt_f4` Release Notes: - Fixed Alt+F4 on Windows so Zed closes even when the integrated terminal is focused. --------- Co-authored-by: Jakub Konka --- assets/keymaps/default-windows.json | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.json index 8651bfbe3b..8d60a68dbc 100644 --- a/assets/keymaps/default-windows.json +++ b/assets/keymaps/default-windows.json @@ -1226,6 +1226,7 @@ "ctrl-delete": ["terminal::SendText", "\u001bd"], "ctrl-n": "workspace::NewTerminal", // Overrides for conflicting keybindings + "alt-f4": "workspace::CloseWindow", "ctrl-b": ["terminal::SendKeystroke", "ctrl-b"], "ctrl-c": ["terminal::SendKeystroke", "ctrl-c"], "ctrl-e": ["terminal::SendKeystroke", "ctrl-e"],