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
44.38k stars 2.39k forks source link

Super key not having any effect in Linux. #14039

Closed mwotton closed 2 weeks ago

mwotton commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I am not able to use Super-up (for example) in zed.

xev for super-up gives me this

KeyPress event, serial 34, synthetic NO, window 0xf200001,
    root 0x240, subw 0x0, time 1295479377, (787,1315), root:(8366,1684),
    state 0x50, keycode 111 (keysym 0xff52, Up), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

so it doesn't seem to be being captured by my window manager (xmonad) or desktop environment (mate).

ctrl-up, alt-up etc all work.

this happens on two different machines (both with a similar xmonad/mate setup, though).

Zed logs are from after pressing Super-Up a bunch of times.

Environment

Zed: v0.144.0 (Zed Dev d01d76482d00e8388f68177f42e4c072f15f40a9) OS: Linux X11 linuxmint 21 Memory: 125.6 GiB Architecture: x86_64

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

2024-07-10T10:16:46+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:16:46+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:04+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:04+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:04+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:04+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:05+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:05+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-07-10T10:17:05+07:00 [WARN] Unknown button press: ButtonPressEvent { .. }

notpeter commented 1 month ago

I assume you're referring to the keybinds for the windows key (super on linux, cmd on MacOS) used for window management like super-+, super--, super-0 (Zoom In, Out, Reset), super-up (Maximize), super-left, super-right, super-down, etc.

On my Linux system (KDE, Wayland) those keys work as expected with Zed. I'm not super familiar with xmonad or mate, but I would expect those events would never make it to Zed and be handled by your DE/WM. Not sure.

mwotton commented 1 month ago

That's what I thought, which is why I did the attached xev test which shows that they are going through to the X client. You can also see in the Zed logs that it's getting an unknown key press, so it is getting something.

Is it possible I've somehow misconfigured Zed? I'm a bit stumped as to how to keep debugging this.