From 3dde315a13003c8530970d98bc8e4145cebb36b6 Mon Sep 17 00:00:00 2001 From: Om Chillure Date: Mon, 30 Mar 2026 19:53:01 +0530 Subject: [PATCH] agent panel: Fix keybindings on Linux (#52672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Context Fixes agent panel keybindings on Linux, mirroring the Windows fix from #43692. On Linux, `Ctrl+Y` (the previous `agent::AllowOnce` binding) is intercepted by the focused text input as "redo", so the shortcut did nothing when the message editor was focused. This is the same issue fixed for Windows in #43692. Changes (Linux and Windows): - `agent::AllowAlways`: added `shift-alt-q` (was unbound on all platforms) - `agent::AllowOnce`: `ctrl-y` → `shift-alt-a` (Linux); already `shift-alt-a` on Windows - `agent::RejectOnce`: `shift-alt-x` on both platforms — `shift-alt-z` conflicted with `agent::RejectAll` bound in other contexts, causing the keybinding hint to not appear in the UI - `agent::ToggleNavigationMenu`: `ctrl-shift-j` → `shift-alt-j` (Linux) - `agent::ToggleOptionsMenu`: `ctrl-alt-i` → `shift-alt-i` (Linux) Closes #52472 ## How to Review Two files changed: `assets/keymaps/default-linux.json` and `assets/keymaps/default-windows.json`. Check the `AgentPanel` context block in each. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Note : Reopens previous work from closed PR #52479 (fork was deleted) Release Notes: - Fixed agent panel `Allow`, `Always Allow`, and `Reject` keybindings not working when the message editor is focused on Linux e --- assets/keymaps/default-linux.json | 9 +++++---- assets/keymaps/default-windows.json | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 1bc3b666beaaac78740c335bbcac9603d6a4d07f..d5643e092268470e61b54001ab57d83ec7cd9467 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -254,17 +254,18 @@ "alt-tab": "agent::CycleFavoriteModels", // `alt-l` is provided as an alternative to `alt-tab` as the latter breaks on Linux under the `AgentPanel` context "alt-l": "agent::CycleFavoriteModels", - "ctrl-shift-j": "agent::ToggleNavigationMenu", - "ctrl-alt-i": "agent::ToggleOptionsMenu", + "shift-alt-j": "agent::ToggleNavigationMenu", + "shift-alt-i": "agent::ToggleOptionsMenu", "ctrl-alt-shift-n": "agent::ToggleNewThreadMenu", "ctrl-shift-t": "agent::CycleStartThreadIn", "shift-alt-escape": "agent::ExpandMessageEditor", "ctrl->": "agent::AddSelectionToThread", "ctrl-shift-e": "project_panel::ToggleFocus", "ctrl-shift-enter": "agent::ContinueThread", - "ctrl-y": "agent::AllowOnce", + "shift-alt-q": "agent::AllowAlways", + "shift-alt-a": "agent::AllowOnce", "ctrl-alt-a": "agent::OpenPermissionDropdown", - "ctrl-alt-z": "agent::RejectOnce", + "shift-alt-x": "agent::RejectOnce", "ctrl-tab": "agents_sidebar::ToggleThreadSwitcher", "ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }], }, diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.json index aa31629bcb1739288dcdaef16ad1af5b116d68f1..32f827259cbcf8bab39a8bbe45a9010d7239e2a7 100644 --- a/assets/keymaps/default-windows.json +++ b/assets/keymaps/default-windows.json @@ -263,9 +263,10 @@ "ctrl-shift-.": "agent::AddSelectionToThread", "ctrl-shift-e": "project_panel::ToggleFocus", "ctrl-shift-enter": "agent::ContinueThread", + "shift-alt-q": "agent::AllowAlways", "shift-alt-a": "agent::AllowOnce", "ctrl-alt-a": "agent::OpenPermissionDropdown", - "shift-alt-z": "agent::RejectOnce", + "shift-alt-x": "agent::RejectOnce", "ctrl-tab": "agents_sidebar::ToggleThreadSwitcher", "ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }], },