SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** If I go in Settings, Workspace -> Workspace Behavior and scroll down to the Desktop Grid effect under Window Management, and click on the Cog at the right (Effect Settings) and try to assign a keyboard shortcut to the effect, it'll look like it saved it. But if you go back into the effect's settings, the shortcut will be gone. STEPS TO REPRODUCE 1. Go to Settings, Workspace -> Workspace Behavior 2. Scroll down to Desktop Grid, and click on the Cog (Settings) 3. Try to assign a keyboard shortcut to the effect. OBSERVED RESULT The shortcut disappears/does not save after clicking OK EXPECTED RESULT The shortcut should have saved SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Fedora 38 KDE, 5.27.7 (available in About System) KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.109.9 Qt Version: 5.15.10 ADDITIONAL INFORMATION
Are you entering it in the "Shortcut" or "Alternate" fields, or in the "Global" or "Global Alternate" fields?
Created attachment 161732 [details] Demonstration of behavior Hopefully this video demonstrates the problem! Thanks!
Yup, you're adding it in the "Shortcut" field. But that field is only for local shortcuts, not global shortcuts. The bug here appears to be that we even allow setting local shortcuts to trigger these global effects, which does not make sense. Will fix. As a workaround, scroll to the right and set the shortcut in the "Global" or "Global Alternate" field.
https://invent.kde.org/frameworks/kxmlgui/-/commit/33339de5626242b586db63de88666a31023bcba3 made the shortcuts editor automatically hide the columns for global shortcuts when there aren't any. But it didn't do the same thing in reverse. We could feasibly do that too. Another option is manually specifying the "only show global shortcuts" mode in all the KWin effects individually. But I prefer the automatic thing. I'll work on that.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/189
Git commit 634e8225371a72cd5a84c6946dbf78a262221622 by Nate Graham. Committed on 25/09/2023 at 23:53. Pushed by ngraham into branch 'master'. KShortcutsEditor: hide local shortcuts columns when needed 33339de5626242b586db63de88666a31023bcba3 resulted in the global shortcuts columns being automatically hidden when the dialog has no global shortcuts. However it did not do the reverse, which is also possible. For example, KWin effects have only global shortcuts and no local shortcuts (local shortcuts don't even make sense there). In such a case, we should hide the local shortcuts columns and only show the global ones. FIXED-IN: 6.0 M +2 -0 src/kshortcutsdialog_p.h M +9 -0 src/kshortcutseditor.cpp https://invent.kde.org/frameworks/kxmlgui/-/commit/634e8225371a72cd5a84c6946dbf78a262221622