Bug 479647

Summary: Screen Layout switching shortcut Meta+P does not work in Plasma 6 rc1
Product: [Plasma] KScreen Reporter: SigHunter <sighunter>
Component: OSD and Plasma appletAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: josef64, kde, nate, nicolas.fella
Priority: NOR Keywords: qt6
Version First Reported In: 5.92.0   
Target Milestone: 1.0   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=475694
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:

Description SigHunter 2024-01-11 13:55:34 UTC
SUMMARY
I recently switched from Plasma 5.27 to Plasma 6 beta 2 and now rc1 and on both versions, the shortcut meta+p that usually switches screen layout does not show up. But layout switching works as expected via "Display Configuration" shortcut in systray 


STEPS TO REPRODUCE
1. Attach multiple displays to computer
2. Press Meta+P (Windows+P)
3. 

OBSERVED RESULT
nothing happens

EXPECTED RESULT
centered popup with the screen layout options

SOFTWARE/OS VERSIONS
Linux: Gentoo 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0 
Qt Version: 6.6.1
Kernel Version: 6.6.11-gentoo-dist (64-bit)

ADDITIONAL INFORMATION
I checked in keyboard shortcuts kcm and set and unset meta+p but it did not change anything. I had a white "kded6" in keyboard shortcuts which seems to provide this meta+p shortcut and for testing I removed it, now I can not add it back (no idea how).
there are some other open bugs for keyboard shortcuts, but I was not sure if they are duplicates to this one.
The described issue appears on multiple (somewhat) identical machines and also on newly created users with fresh config.

thank you all for your hard work! kde is awesome
Comment 1 Nicolas Fella 2024-01-11 20:28:52 UTC
related to https://bugs.kde.org/show_bug.cgi?id=475694
Comment 2 Vlad Zahorodnii 2024-01-23 10:37:05 UTC
Git commit 167770b53920ebd3c75ed5c7328ccb651c6b6333 by Vlad Zahorodnii, on behalf of Nicolas Fella.
Committed on 23/01/2024 at 11:35.
Pushed by vladz into branch 'master'.

Define display switcher shortcut via desktop file instead of at runtime

As per https://phabricator.kde.org/T12063 we want to move more towards defining shorcuts via desktop files instead of at runtime, which has several problems

Instead of creating a KActionCollection and QAction, assigning a global shortcut, and connecting to the QAction being triggered define a DBus call to be executed when triggering the shortcut

This fixes several problems:

- The current shortcut is registered under the kded5 component, which not only looks weird in the systemsettigs UI,
it also breaks in Plasma 6 where kded6 is used

- On Wayland the kded module isn't used, so nothing handles the shortcut there currently
Related: bug 475694

M  +0    -1    .kde-ci.yml
M  +0    -1    CMakeLists.txt
M  +0    -1    kded/CMakeLists.txt
M  +1    -18   kded/daemon.cpp
M  +2    -0    osd/CMakeLists.txt
A  +13   -0    osd/org.kde.kscreen.desktop

https://invent.kde.org/plasma/kscreen/-/commit/167770b53920ebd3c75ed5c7328ccb651c6b6333
Comment 3 Vlad Zahorodnii 2024-01-23 10:44:17 UTC
Git commit 0b19db456ff44e759e7ce4786ff84289a896d11e by Vlad Zahorodnii, on behalf of Nicolas Fella.
Committed on 23/01/2024 at 11:40.
Pushed by vladz into branch 'Plasma/6.0'.

Define display switcher shortcut via desktop file instead of at runtime

As per https://phabricator.kde.org/T12063 we want to move more towards defining shorcuts via desktop files instead of at runtime, which has several problems

Instead of creating a KActionCollection and QAction, assigning a global shortcut, and connecting to the QAction being triggered define a DBus call to be executed when triggering the shortcut

This fixes several problems:

- The current shortcut is registered under the kded5 component, which not only looks weird in the systemsettigs UI,
it also breaks in Plasma 6 where kded6 is used

- On Wayland the kded module isn't used, so nothing handles the shortcut there currently
Related: bug 475694
(cherry picked from commit 167770b53920ebd3c75ed5c7328ccb651c6b6333)

M  +0    -1    .kde-ci.yml
M  +0    -1    CMakeLists.txt
M  +0    -1    kded/CMakeLists.txt
M  +1    -19   kded/daemon.cpp
M  +2    -0    osd/CMakeLists.txt
A  +13   -0    osd/org.kde.kscreen.desktop

https://invent.kde.org/plasma/kscreen/-/commit/0b19db456ff44e759e7ce4786ff84289a896d11e
Comment 4 SigHunter 2024-01-23 12:49:44 UTC
thanks Vlad and Nicolas, I rebuild kscreen 6.0 rc1 with the patch and after a reboot it works again, very nice