Skip to content

Keymap Editor: Cannot bind keystroke + context to unbound action #52812

@thdoan

Description

@thdoan

Reproduction steps

  1. Start Zed
  2. Open Keymap Editor
  3. Search for "open recent" and bind it to something else like Alt+O:
Image
  1. Search for "reload" and bind it to keystroke Ctrl+R and context Workspace

Current vs. Expected behavior

Current behavior: it won't let me save the custom binding when context is set to Workspace, so you are forced to use a <global> context.

Image

Expected behavior: I should be able to bind a custom keystroke within Workspace context when the default action for that keystroke is unbound.

Zed version and system specs

Zed: v0.230.0+preview.205.9437a84390a396d666f04b38db87d89bb07284c1 (Zed Preview)
OS: Windows 10.0.26200
Memory: 59.7 GiB
Architecture: x86_64
GPU: AMD Radeon(TM) 780M || AMD Corporation || 25.20.24.04 (25.20.24.04-251112a-196848C)

Attach Zed log file

N/A (fresh install)

Relevant Zed settings

N/A (fresh install)

Relevant Keymap

keymap.json
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
  {
    "context": "Workspace",
    "bindings": {
      // "shift shift": "file_finder::Toggle"
    },
  },
  {
    "context": "Editor && vim_mode == insert",
    "bindings": {
      // "j k": "vim::NormalBefore"
    },
  },
  {
    "context": "Workspace",
    "bindings": {
      "alt-o": [
        "projects::OpenRecent",
        {
          "create_new_window": false
        }
      ]
    }
  },
  {
    "context": "Workspace",
    "unbind": {
      "ctrl-r": [
        "projects::OpenRecent",
        {
          "create_new_window": false
        }
      ]
    }
  },
  {
    "bindings": {
      "ctrl-r": "editor::ReloadFile"
    }
  }
]

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:needs triagetriage is not complete: no `area:*` label, or no `priority:*`/`frequency:*` for Bugs/Crashes

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions