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
50.6k stars 3.14k forks source link

When shift is pressed, the string shift is printed #20963

Closed jizhi0v0 closed 3 days ago

jizhi0v0 commented 4 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

when knock the shift key, the string shift is append in current line

https://github.com/user-attachments/assets/cdb51b28-1691-40d8-a997-b3bb0904fe37

Environment

zed preview 0.162.3 version Apple M3 Max 36 GB 15.1 (24B83)

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.

Zed.log ``` [Zed.log](https://github.com/user-attachments/files/17839514/Zed.log) ```
jizhi0v0 commented 4 days ago

This issue only in 0.163.0 preview and 0.162.3 stable

jizhi0v0 commented 4 days ago

git bisect start git bisect good v0.161.2 git bisect bad v0.162.3

Finally c4a382d7cb93f5fbd3e9bc0821dfb6f74fc64de9 is the first bad commit

caturbgs commented 4 days ago

This is very frustrating issue I got today after updating Zed, hope this will take up soon

eatenpancreas commented 4 days ago

Having the same issue here

lebe-dev commented 4 days ago

Approved, v0.161.2 is not affected

piechologist commented 4 days ago

Do you all have a key binding for "shift shift"?

For me, pressing shift twice runs the bound action as intended. Pressing shift just once inserts shift into the editor after a split second. Removing the key binding solves the issue.

The same issue occurs with the other modifiers e.g., binding "cmd cmd" inserts platform.

BraisonCrece commented 4 days ago

Do you all have a key binding for "shift shift"?

For me, pressing shift twice runs the bound action as intended. Pressing shift just once inserts shift into the editor after a split second. Removing the key binding solves the issue.

The same issue occurs with the other modifiers e.g., binding "cmd cmd" and inserts platform.

Yes, I have shift shift binding and disabling it fixes the problem 👍

eatenpancreas commented 4 days ago

@piechologist do you mean like this? I'm getting it but very inconsistently so image

eatenpancreas commented 4 days ago

I figured out what's causing it on my end (sort of).

For me, it's only happening if i select something, while selected press shift (just once) and then leave the selection by clicking somewhere else. It'll then just get pasted wherever i clicked to next.

https://github.com/user-attachments/assets/ce751ce8-73ce-439d-b24f-90c585ec2f2a

piechologist commented 4 days ago

For me, it's only happening if i select something

I can't replicate that. It doesn't matter if there's a selection or not. With the shift shift binding commented out, nothing gets inserted.

xplodwild commented 4 days ago

Same happens for me on Linux v0.162.3, with a "shift shift" keybinding enabled, pressing shift then an arrow key leads to "shift" being inserted in the current buffer.

Disabling/commenting my "shift shift" keybinding, the problem goes away immediately.

blueambr commented 4 days ago

I don't have any bindings and this happens. It's a ridiculously annoying bug. Wonder how it was introduced into the stable build.

HarshNarayanJha commented 4 days ago

Can confirm. It is happening on the latest stable. I do have a shift-shift key binding to open ctrl+p menu

System Info Zed: v0.162.3 (Zed) OS: Linux Wayland garuda unknown Memory: 7.1 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV RENOIR) || radv || Mesa 24.2.7-arch1.1
VladimirTaytor commented 4 days ago

Same here. I don't have "shift shift" custom bindings, but I do have "base_keymap": "JetBrains" Please take a look asap, it's very annoying 🙏

eatenpancreas commented 4 days ago

Same here. I don't have "shift shift" custom bindings, but I do have "base_keymap": "JetBrains" Please take a look asap, it's very annoying 🙏

now that you say it, i also have JetBrains base keymap as well, so that could be a part of it

modelga commented 4 days ago

Hi!, It's bothering me too, additionally, when I add an extra keybinding "cmd cmd": "workspace::ToggleZoom" I've got another text inserted in editor -> platform while I pressed 'cmd' only once and then clicked somewhere else. I have base_keymap derived from VSCode.

Using MacOS 14.7.1 on M1 arm64 architecture

piechologist commented 4 days ago

Zed Preview 0.163.1 is out with a fix.

Thanks to the Zed team for the quick response! 🚀