keymap_editor: Allow to open the keymap.json with a keybinding (#45987)

Smit Chaudhary and Danilo Leal created

Just like #43747 added the keybinding(s) for `settings.json`, added them
here for keymaps and added the tooltip to show those.

<img width="500" height="282" alt="Screenshot 2026-01-04 at 2  47@2x"
src="https://github.com/user-attachments/assets/d4dbdd6e-24eb-4b7f-baa8-6e1d9810ff94"
/>

Release Notes:

- keymap editor: Added the ability to open the `keymap.json` file with a
keybinding.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Change summary

assets/keymaps/default-linux.json         | 1 +
assets/keymaps/default-macos.json         | 1 +
assets/keymaps/default-windows.json       | 1 +
crates/keymap_editor/src/keymap_editor.rs | 4 ++++
4 files changed, 7 insertions(+)

Detailed changes

assets/keymaps/default-linux.json 🔗

@@ -1209,6 +1209,7 @@
       "ctrl-c": "keymap_editor::CopyAction",
       "ctrl-shift-c": "keymap_editor::CopyContext",
       "ctrl-t": "keymap_editor::ShowMatchingKeybinds",
+      "ctrl-e": "zed::OpenKeymapFile",
     },
   },
   {

assets/keymaps/default-macos.json 🔗

@@ -1310,6 +1310,7 @@
       "cmd-c": "keymap_editor::CopyAction",
       "cmd-shift-c": "keymap_editor::CopyContext",
       "cmd-t": "keymap_editor::ShowMatchingKeybinds",
+      "cmd-e": "zed::OpenKeymapFile",
     },
   },
   {

assets/keymaps/default-windows.json 🔗

@@ -1237,6 +1237,7 @@
       "ctrl-c": "keymap_editor::CopyAction",
       "ctrl-shift-c": "keymap_editor::CopyContext",
       "ctrl-t": "keymap_editor::ShowMatchingKeybinds",
+      "ctrl-e": "zed::OpenKeymapFile",
     },
   },
   {

crates/keymap_editor/src/keymap_editor.rs 🔗

@@ -1872,6 +1872,10 @@ impl Render for KeymapEditor {
                                             .child(
                                                 Button::new("edit-in-json", "Edit in JSON")
                                                     .style(ButtonStyle::Subtle)
+                                                    .key_binding(
+                                                        ui::KeyBinding::for_action_in(&zed_actions::OpenKeymapFile, &focus_handle, cx)
+                                                            .map(|kb| kb.size(rems_from_px(10.))),
+                                                    )
                                                     .on_click(|_, window, cx| {
                                                         window.dispatch_action(
                                                             zed_actions::OpenKeymapFile.boxed_clone(),