Bug 452649 - System-installed apps can have their keyboard shortcuts removed in the KCM, but they just return after rebooting
Summary: System-installed apps can have their keyboard shortcuts removed in the KCM, b...
Status: ASSIGNED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: 5.24.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
: 448260 479767 486456 501234 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-15 08:44 UTC by devakant.j
Modified: 2025-04-25 07:25 UTC (History)
10 users (show)

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


Attachments
systemsettings hotkeys (167.36 KB, image/png)
2022-04-18 20:04 UTC, devakant.j
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devakant.j 2022-04-15 08:44:50 UTC
If you delete the application in the keyboard shortcut, and then save it, then after restarting the computer, the applications come back. Most likely, the problem is related to the fact that the keyboard shortcut is used in the application. I offer two solutions. First, to be able to delete any application from keyboard shortcuts. Secondly, delete only manually added applications, and those that are added by the system, remove the possibility of deletion in principle. (but it is possible to delete the program, and in this case, this application will also disappear from the keyboard shortcuts.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: manjaro 5.17.0
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2022-04-18 15:59:47 UTC
In System Settings, did you do this in the "Custom Shortcuts" page, or the "Shortcuts" page? There are two, and they are different.
Comment 2 devakant.j 2022-04-18 20:04:02 UTC
Created attachment 148230 [details]
systemsettings hotkeys

I'll attach a screenshot
Comment 3 Nate Graham 2022-04-19 15:03:39 UTC
Ok, so the new one. Thanks.

> Secondly, delete only manually added applications, and those that are added by the system,
> remove the possibility of deletion in principle
Yes, I think this makes the most sense. We take this approach for other system-installed content in other System Settings KCMs.
Comment 4 Nate Graham 2024-01-16 23:23:28 UTC
*** Bug 479767 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2024-03-18 17:36:32 UTC
This gets a bit tricky depending on how the shortcuts are defined.

There's several cases to consider:
1) "Core system components" that register their shortcuts at runtime, e.g. "KWin" or "Audio Volume". A user should not be able to remove these sections as a whole, only unbind individual shortcuts. Currently we allow removing those categories
2) (third-party) applications that register their shortcuts at runtime, e.g. Choqok or Strawberry. Here users should probably be able to remove those entirely, especially since uninstalling these apps won't remove the shortcuts.
3) "Core system components" that register their shortcuts statically via desktop files, e.g. "Display Setup".  A user should not be able to remove these sections as a whole, only unbind individual shortcuts. Currently we allow removing those categories
4) third-party) applications that register their shortcuts statically via desktop files, e.g. "Spectacle" or "Konsole". Here I'm not sure whether the user should be able to remove the whole category. The problem currently is when users do remove them they come back
5) User-added application/command shortcuts. Those should be and are removable

The challenge is that it's not always possible to distinguish cleanly between these cases, e.g. we can't really distinguish between 1) and 2)
Comment 6 cwo 2024-07-01 13:39:02 UTC
*** Bug 486456 has been marked as a duplicate of this bug. ***
Comment 7 Bug Janitor Service 2024-07-19 15:27:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kglobalacceld/-/merge_requests/56
Comment 8 Bug Janitor Service 2024-07-23 19:03:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2395
Comment 9 Nate Graham 2024-08-16 04:51:36 UTC
*** Bug 448260 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2024-09-26 14:05:08 UTC
Git commit 330182246685e12b0562d57913dea7830b816139 by Nate Graham, on behalf of Nicolas Fella.
Committed on 26/09/2024 at 13:24.
Pushed by ngraham into branch 'master'.

[kcms/keys] Don't allow to remove built-in components

Currently we allow to remove any component, but they might reappear
again because the application re-registers them or the desktop file
is picked up again.

In most cases removing doesn't make much sense in the first place
since they are core system components that a user should not be
able to remove wholesale. They can unbind individual shortcuts
that are not wanted.

This introduces logic to determine whether a component should
be removable or not. For now it only coveres desktopfile-based
shortcuts since those are easier to deal with.

The logic is:
- Things in the System Services category cannot be removed
- Things in the Applications section can be removed if the
relevant desktop file has no shortcuts defined, i.e. the user
added it explicity

Dealing with runtime-registered shortcuts is left as a future
exercise

M  +60   -11   kcms/keys/basemodel.cpp
M  +1    -0    kcms/keys/basemodel.h
M  +1    -0    kcms/keys/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/330182246685e12b0562d57913dea7830b816139
Comment 11 Nate Graham 2024-09-26 15:04:56 UTC
Half fixed by that commit. Needs more changes to apply also apply this to system services that register shortcuts at runtime vs using a .desktop file.
Comment 12 fanzhuyifan 2025-03-08 20:05:09 UTC
*** Bug 501234 has been marked as a duplicate of this bug. ***
Comment 13 D. Debnath 2025-03-08 20:17:55 UTC
(In reply to fanzhuyifan from comment #12)
> *** Bug 501234 has been marked as a duplicate of this bug. ***

The bug I reported has been marked as a duplicate of this bug. While this bug appears to be similar to the bug I reported, I'm not sure they are the same bug.

This bug report says:

> If you delete the application in the keyboard shortcut, and then save it, then after restarting the computer, the applications come back.

The bug I'm experiencing doesn't require restarting the computer. Every time I open Chromium, if the keyboard shortcut entry of Chromium doesn't exist, it immediately adds it right back (and also opens the Shortcuts page in System Settings).

Also, this bug report is from 2022. I haven't experienced this until this week. Seems like something new has happened in a recent update of Chrome or Plasma.