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
49.62k stars 3.04k forks source link

Keybind for `Editor::rewrap` prevents `@` from being typed in editor for certain keyboard-layouts on Mac #18104

Closed MrSubidubi closed 2 days ago

MrSubidubi commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Due to option-q being mapped to @ on certain keyboard-layouts for Mac, I am unable to enter the @-symbol in the editor as this conflicts with the keybinding introduced for Editor::rewrap in #17953 .

The affected keyboard-layouts include at least the QWERTZ - and the hungarian layout.

I had to manually remove the keybinding for Editor::rewrap in my keymap.json with

{
    "bindings": {
        "alt-q": null
    }
},
...

While this seems to be the most reasonable keybinding as per https://github.com/zed-industries/zed/issues/4588#issuecomment-2230128399 , I do not think this should cause symbol inputs to not be registered and require a manual unbind.

I believe this might be a Mac-only issue, as non-mac keyboards bind @ to Alt Gr + q, however I am not sure whether GPUI differentiates Alt and Alt Gr.

Environment

Zed: v0.154.0 (Zed Preview) OS: macOS 14.6.1 Memory: 8 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

miltonparedes commented 1 month ago

Same here 😕, had to fix it with:

"ctrl-q": "editor::Rewrap",
"alt-q": null
MrSubidubi commented 2 days ago

20378 adressed this issue.