zed icon indicating copy to clipboard operation
zed copied to clipboard

Linux: Zed repeats compose key output after computer wakes from sleep/suspend

Open charliemikels opened this issue 10 months ago • 2 comments

Summary

If Zed is open and the user sleeps and wakes up their computer, future uses of the compose key will insert duplicates of the result, instead of just one instance of the result.

Tested on Fedora 41 with Gnome and Wayland. A similar features exists on KDE and Gnome with X11, but I haven't tested them yet.

Steps to trigger the problem:

  1. Enable the compose key in Gnome settings. (Settings → Keyboard → Compose Key.) I've set mine to Right Alt.
  2. Launch Zed, and type any compose key sequence. (EG: <Compose>+^+| = )
    • If Zed was recently launched, this works as intended and only inserts one .
  3. Sleep the computer, and wake it up again.
  4. Retype the compose key sequence. Zed will now insert four s instead of just one.

This problem compounds. If you sleep and wake the computer again, Zed now inserts 7 s instead of just 1 (adding 3 extra s per sleep)

Actual Behavior:

Zed behaves correctly if the computer has not fallen asleep while it's been running, but will begin to duplicate compose key outputs after the computer is put to sleep and woken up while Zed is still running.

See inside for video demonstrating this behavior

https://github.com/user-attachments/assets/8e5da30d-0988-4bfd-8940-3cee4b8b8b4b

(Light theme to reduce video compression flicker.)

Tested on Fedora 41 with Gnome and Wayland, using Zed version 0.176.1 (121bd97cb189d272c746e04b8d15d188ffe346c5).

Expected Behavior:

Zed should not duplicate the result of the compose key sequence, and only type the resulting character once.

Zed Version and System Specs

Zed: v0.176.1 (Zed) OS: Linux Wayland fedora 41 Memory: 31.3 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 3060 || NVIDIA || 570.86.16

charliemikels avatar Mar 04 '25 17:03 charliemikels

Interesting, I have never heard of the compose key. Thanks for reporting!

probably-neb avatar Mar 21 '25 00:03 probably-neb

So the problem is still unresolved, I have to close zed and reopen it every time

dashabi99 avatar Jun 03 '25 09:06 dashabi99

Just a quick update that I noticed:

It appears that there are now cases where Zed inserts 2 extra characters instead of 3 as described above.

In the below demo video, the compose key after the first sleep inserts 2 extra characters, but the compose key after the 2nd sleep inserts 5 extra (2 + 3).

https://github.com/user-attachments/assets/502d35f4-5b3b-4605-ac4b-ac1aa369b279

However Zed still sometimes inserts 3 extra after the first sleep as in the original description. So I'm note sure how to control when it outputs 2 or 3.

Zed version: 0.194.3 (5df1775990dee09114a1423317561c34699f67ac)

charliemikels avatar Jul 10 '25 20:07 charliemikels