zed icon indicating copy to clipboard operation
zed copied to clipboard

Comment Key Bidding Stopped Working

Open xcrap opened this issue 6 months ago • 4 comments

Summary

My custom comment keybidding stopped working again in the latest version.

Description

{
    "context": "Editor",
    "use_key_equivalents": true,
    "bindings": {
        "cmd-shift-7": [
            "editor::ToggleComments",
            {
                "advance_downwards": false
            }
        ]
    }
},

This is my comments keybidings because of latin keyboard. So in the latest version of Zed Preview, that shortcut makes nothing, in Zed Stable in PHP in comments with instead of // ... and <!-- this is not valid for php....

Zed Preview 0.189.0 Zed 0.188.3

Zed Version and System Specs

Zed: v0.188.3 (Zed) OS: macOS 15.5.0 Memory: 64 GiB Architecture: aarch64

xcrap avatar May 28 '25 23:05 xcrap

So, there are two issues:

  1. Your custom keybinding is not working in the latest version, which worked before.
  2. PHP comments are being displayed as <!— —> instead of //? Did this issue exist before, or has it always been broken?

Is this correct?

smitbarmase avatar May 29 '25 03:05 smitbarmase

So, there are two issues:

  1. Your custom keybinding is not working in the latest version, which worked before.
  2. PHP comments are being displayed as <!— —> instead of //? Did this issue exist before, or has it always been broken?

Is this correct?

It's the same issue, so that comment key bidding has no effect latest Zed Preview (nothing happens), and that key kidding makes that wrong comment in PHP files in the Stable Preview, both happen yesterday in Zed Stable and Zed Preview releases.

    {
        "context": "Workspace",
        "use_key_equivalents": true,
        "bindings": {
            "cmd-shift-t": "workspace::ToggleBottomDock"
        }
    }

This other key binding for terminal is working normally in both. (that's the only two key bindings I currently have). Until yesterday everything was working fine in both Zed Preview and Zed Stable.

xcrap avatar May 29 '25 06:05 xcrap

Image

Also in both you can see the correct key bidding associated with the expected command. Also in the Stable the incorrect comments format it appears to only be happening in PHP as in JS it's commenting as expected, but in Zed Preview that key bidding does not work at all in any language.

xcrap avatar May 29 '25 06:05 xcrap

Also more interesting stuff, so the key bigging with cmd-shit-anynumber don't work. If i change for cmd-alt-7 it could work, or cmd-shit-c it would also work, but the cmd-shit-number combination dont work, its none of my apps since cmd-shit-7 its the equivalent to cmd-shift-/ which i also use currently in vscode and since ever and its working fine and was working fine in zed last fine. So another super strange stuff....

xcrap avatar May 30 '25 22:05 xcrap

Same here!

It was working until the last update. In Spanish, German and other keyboard distributions, cmd + / is not possible to do directly, because you have to do shift + 7 to get the slash.

In VSCode, due to the fact that shift + 7 does the slash, cmd + / is the same as cmd + shift + 7, and it works.

Now, in Zed, in v0.188.x, cmd + shift + 7 was doing the trick, same as in VSCode, but not anymore.

I've switched to cmd + / and now it works (same as VSCode), so maybe this got "fixed"?

nx-alejandrolacasa avatar Jun 05 '25 12:06 nx-alejandrolacasa

Good finding @nx-alejandrolacasa

Adding this to the keymap fixes the issue for italian keyboard:

{
  "cmd-/": [
    "editor::ToggleComments",
    {
      "advance_downwards": false
    }
  ],
}

remorses avatar Jun 05 '25 12:06 remorses

Trying the new Keymap Editor, super strange. So with Latin Keyboard

CMD + SHIT + 7 (/) he detects as...

Image

Then I got a ...

Image

But it was saved as...

Image

So technically / it reached with shift 7.. but it's confusing before i had to set with cmd+shift+7 and now this works like this lol. So I'm not sure about the keyboard bindings for latin chars anymore.

xcrap avatar Jul 24 '25 00:07 xcrap

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 11:11 github-actions[bot]