Bug 474570 - AllActions mode hides global shortcut columns if there are no global shortcuts, but doesn't hide the local shortcut columns if there are no local shortcuts
Summary: AllActions mode hides global shortcut columns if there are no global shortcut...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.110.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2023-09-15 18:16 UTC by Steve Cossette
Modified: 2023-09-25 22:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
Demonstration of behavior (3.17 MB, video/mp4)
2023-09-19 18:07 UTC, Steve Cossette
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Cossette 2023-09-15 18:16:00 UTC
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
Comment 1 Nate Graham 2023-09-19 18:05:28 UTC
Are you entering it in the "Shortcut" or "Alternate" fields, or in the "Global" or "Global Alternate" fields?
Comment 2 Steve Cossette 2023-09-19 18:07:38 UTC
Created attachment 161732 [details]
Demonstration of behavior

Hopefully this video demonstrates the problem!

Thanks!
Comment 3 Nate Graham 2023-09-20 17:20:19 UTC
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.
Comment 4 Nate Graham 2023-09-20 20:59:45 UTC
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.
Comment 5 Bug Janitor Service 2023-09-20 22:07:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/189
Comment 6 Nate Graham 2023-09-25 22:02:44 UTC
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