From 39721045f93714100517ad12b4173fd3580340ca Mon Sep 17 00:00:00 2001 From: Daniel Eichman <61132910+zfz7@users.noreply.github.com> Date: Thu, 12 Mar 2026 04:25:24 -0700 Subject: [PATCH] Add missing ctrl-shift-g binding for editor::UndoSelection to the JetBrains/IntelliJ keymap on macOS (#51130) ## Description: This PR adds the missing `ctrl-shift-g` binding for editor::UndoSelection to the JetBrains/IntelliJ keymap on macOS. ## Problem In IntelliJ IDEA, when using multiple cursors: - ctrl+g (macOS) adds the next occurrence to the selection - ctrl+shift+g (macOS) removes the last added occurrence from the selection The current Zed JetBrains keymap has `ctrl-g` for SelectNext but is missing the corresponding `ctrl-shift-g` for undoing/removing the last selection. ## Reference - Press Ctrl+G (macOS) to find and select the next occurrence [link](https://www.jetbrains.com/help/idea/multicursor.html#multiple_words) - To remove selection from the last selected occurrence, press Ctrl+Shift+G (macOS) [link](https://www.jetbrains.com/help/idea/multicursor.html#multiple_words) This change improves parity with IntelliJ for users transitioning to Zed. ### Demo https://github.com/user-attachments/assets/0c7f699f-697d-4b81-a929-53f765d254d8 Closes #ISSUE Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [X] Done a self-review taking into account security and performance aspects - [ ] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - JetBrains macOS bindings: added the missing `ctrl-shift-g` binding for `editor::UndoSelection` --- assets/keymaps/macos/jetbrains.json | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/keymaps/macos/jetbrains.json b/assets/keymaps/macos/jetbrains.json index 8612e07c4719dfdbf67762c89505cc2da0cfa000..304ffb86e8c2fd08fb756b015490f8c4ac424f58 100644 --- a/assets/keymaps/macos/jetbrains.json +++ b/assets/keymaps/macos/jetbrains.json @@ -33,6 +33,7 @@ "cmd-+": "editor::UnfoldLines", "alt-shift-g": "editor::SplitSelectionIntoLines", "ctrl-g": ["editor::SelectNext", { "replace_newest": false }], + "ctrl-shift-g": "editor::UndoSelection", "ctrl-cmd-g": ["editor::SelectPrevious", { "replace_newest": false }], "cmd-/": ["editor::ToggleComments", { "advance_downwards": true }], "alt-up": "editor::SelectLargerSyntaxNode",