syspower icon indicating copy to clipboard operation
syspower copied to clipboard

Esc key does not close Syspower overlay

Open public-void-ryan opened this issue 2 months ago • 3 comments

Pressing the Esc key does not close the Syspower window, even though this behavior is expected and mentioned in this commit. The overlay remains active until a button is clicked with the mouse.

Steps to Reproduce:

Launch Syspower

Wait for the menu to appear.

Press Esc.

Nothing happens; the menu stays open.

Distribution: NixOS

Syspower version: Latest

Display server: Wayland (Hyprland)

public-void-ryan avatar Nov 04 '25 00:11 public-void-ryan

Odd..? Works fine on my end? The behavior that you're describing sounds like a focus related issue (Hyprland is not focusing on the window with the listener in it) which might be caused by multi monitor setups. Unfortunately i can't reproduce that, I also have 2 monitors and it seems to be working perfectly fine?

Just to verify my theory could you press the down arrow key? If focus is working as intended it should select the shutdown button, Then try pressing escape and it should close.

I can try improving the focus grabber if that fails.

System64fumo avatar Nov 04 '25 02:11 System64fumo

Interesting. I do run 3 monitors on my main, but I can reproduce this on my thinkpad as well. I do use the keyboard to navigate and select the options, and ESC still doesn't do anything. Here is my config for reference:

[main]
position=4
monitor=3
transition-duration=1000

public-void-ryan avatar Nov 04 '25 03:11 public-void-ryan

I guess there's no escape. 🥁 📀 Could you add std::printf("Val: %d\n", keyval); right after line 107 in window.cpp? Maybe also try replacing the hardcoded hex value for escape in line 114 with GDK_KEY_Escape?

System64fumo avatar Nov 04 '25 03:11 System64fumo