Bug 502561 - Using a keyboard shortcut set in Window Rules does not do anything
Summary: Using a keyboard shortcut set in Window Rules does not do anything
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 6.3.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-08 12:59 UTC by Piotr Dobrogost
Modified: 2025-04-10 15:52 UTC (History)
2 users (show)

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


Attachments
window rules (48.90 KB, image/png)
2025-04-08 12:59 UTC, Piotr Dobrogost
Details
window's properties (50.21 KB, image/png)
2025-04-08 12:59 UTC, Piotr Dobrogost
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Dobrogost 2025-04-08 12:59:29 UTC
Created attachment 180090 [details]
window rules

I have set a window rule to apply keyboard shortcut to the specific window as shown in the attached screenshot but the shortcut does not work.
I can see that the window is being matched by setting opacity in the same rule so the
problem is with applying the shortcut not matching a window.
I have similar rules which apply keyboard shortcuts for other windows and they work properly.
I tried different keyboard shortcuts and nothing worked.

One thing specific to this case is that it's the second window of one application (JetBrains' PyCharm IDE).

```
$ kinfo
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.9-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600 6-Core Processor
Memory: 14.8 GiB of RAM
Graphics Processor: AMD Radeon Graphics
```
Comment 1 Piotr Dobrogost 2025-04-08 12:59:55 UTC
Created attachment 180091 [details]
window's properties
Comment 2 TraceyC 2025-04-09 16:50:24 UTC
I'm able to confirm this behavior on git-master by setting the same keyboard shortcut to the properties of the KWrite window, and using similar rules to the ones you have.
When I use the shortcut, nothing happens

I'm also able to reproduce the problem with PyCharm (community edition) on Plasma 6.3.4
Comment 3 Piotr Dobrogost 2025-04-09 18:53:20 UTC
Thanks TraceyC very much for taking a look at this!

> I'm able to confirm this behavior on git-master by setting the same keyboard shortcut to the properties of the KWrite window, and using similar rules to the ones you have.

Could you please describe in more details how did you manage to reproduce this with KWrite? I'm asking because I do not see an easy way of doing this.
With PyCharm, when one opens debug window it has "Debug" word present in the window's title and this allows to target this window only (as opposed to the main PyCharm window opened earlier which does not have this word in its title).
However with KWrite, when one opens the second window its title is the same as the title of the first one ("Welcome – KWrite") which seems to not allow to target each window with separate window rule.
Comment 4 TraceyC 2025-04-10 15:52:39 UTC
With KWrite, I added a shortcut and kept all the other settings as default
Window class - Exact match
Match whole window class - Yes
Window types - normal window

With only one KWrite window open, I expected the shortcut to toggle it. In any case, being able to reproduce with PyCharm matches your situation