Bug 500268 - When closing Krunner with Esc, the focused window also receives the Esc keystroke
Summary: When closing Krunner with Esc, the focused window also receives the Esc keyst...
Status: CONFIRMED
Alias: None
Product: krunner
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.2.5
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-17 16:53 UTC by Peter Fajdiga
Modified: 2025-02-19 21:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Fajdiga 2025-02-17 16:53:29 UTC
SUMMARY
When closing Krunner with the Esc key, the next window that gets focused receives the Esc KeyRelease event.

Most applications don't react to Esc KeyRelease, but some websites do, often closing forms and losing filled data.

Consider making Krunner close on Esc KeyRelease instead of on Esc KeyPress. Note that this solution may be a bit non-standard, as most applications seem to close on Esc KeyPress (same as Krunner).

STEPS TO REPRODUCE
1. Run `xev -event keyboard` in a terminal
2. Make sure the xev window is focused
3. Open Krunner (Alt+F2 or Alt+Space by default)
4. Press the Esc key

OBSERVED RESULT
The Krunner window is closed. The xev window receives focus. Xev also receives the Esc KeyRelease event and prints it to the terminal.

EXPECTED RESULT
The Krunner window is closed. The xev window receives focus. Xev doesn't receive an Esc KeyRelease event.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 24.10
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
It seems closing Krunner with Alt+F2 also triggers an event in the next focused window, but this is not as annoying.
Comment 1 Bug Janitor Service 2025-02-17 17:33:39 UTC
Thank you for the bug report!

However Plasma 6.1.5 is no longer eligible for support or maintenance from KDE; supported versions are 5.27. (LTS), and 6.2 (non-LTS) or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.

If you need support for Plasma 6.1.5, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE.

If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report.
Comment 2 Peter Fajdiga 2025-02-17 18:14:38 UTC
I can reproduce this issue with Plasma 6.2.5.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.5
KDE Frameworks Version 6.10.0
Qt Version: 6.8.1
Comment 3 Peter Fajdiga 2025-02-17 18:14:48 UTC
I can reproduce this issue with Plasma 6.2.5.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.5
KDE Frameworks Version 6.10.0
Qt Version: 6.8.1
Comment 4 cwo 2025-02-17 18:17:44 UTC
Is this X11 or Wayland with XWayland?
Comment 5 Peter Fajdiga 2025-02-17 19:49:35 UTC
It happens on both X11 and Wayland (with XWayland and native Wayland applications).
Comment 6 cwo 2025-02-17 20:32:20 UTC
I can confirm the steps work.

I'm unsure about the correct way of fixing this (and if it's something we should fix). For completeness' sake, can you give an example of a website that has negative consequences on escape release?
Comment 7 Nate Graham 2025-02-18 17:57:24 UTC

*** This bug has been marked as a duplicate of bug 488913 ***
Comment 8 Peter Fajdiga 2025-02-19 09:31:53 UTC
I don't think this is a duplicate of 488913.

This report is about using the Esc key to close Krunner.

488913 reports that keyboard shortcuts still work in full screen apps - specifically Alt+Space still opens Krunner. It's about activating Krunner, not deactivating it. I think 488913's new summary is now inconsistent with its description.
Comment 9 Nate Graham 2025-02-19 21:10:44 UTC
Hmm, maybe you're right.