zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.95k stars 2.95k forks source link

Custom keymappings don't remove the default keymapping #5476

Closed JosephTLyons closed 1 year ago

JosephTLyons commented 2 years ago

If you customize an action's key combo, the old key combo still exists. This doesn't cause any actual issues, but it leaves more stuff around that can wind up getting triggered by accident.

JosephTLyons commented 1 year ago

In v0.94.0, key bindings can be removed via null.

failable commented 1 year ago

@JosephTLyons Does not seem to work for me (0.94.4).

{
    "context": "Editor && mode == full",
    "bindings": {
      "ctrl-g": null
    }
}

still invokes go_to_line::Toggle,

{
    "bindings": {
      "cmd-,": null
    }
}

still opens settings

and

{
    "context": "Editor",
    "bindings": {
        "ctrl-h": null
    }
}

still backspaces.

SomeoneToIgnore commented 1 year ago

Thank you, I've looked at the issue and it seems that Mac menu items (top toolbar) live a bit with their own life: anything there with the default shortcut will have them for a while. I have some ugly fix that proved the hypothesis, so hopefully we'll release a proper fix next week.

SomeoneToIgnore commented 1 year ago

We have a fix coming with Zed 0.94, hopefully today. All three keybindings from https://github.com/zed-industries/zed/issues/5476 are suppressed now, and I don't see any other issues related.

Thank you again for the report.

failable commented 1 year ago

@SomeoneToIgnore Thanks for you work! I can finally rebind those keys!