Bug 438662

Summary: Disk & Devices suddenly pops-up from System Tray when pressing ESC key
Product: [Applications] systemsettings Reporter: Sebastian Gauna <gaunas>
Component: kcm_keysAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate, plasma-bugs
Priority: NOR    
Version: 5.22.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.84
Sentry Crash Report:
Attachments: Settings
kglobalshortcutsrc
plasma-org.kde.plasma.desktop-appletsrc

Description Sebastian Gauna 2021-06-15 03:57:55 UTC
SUMMARY
Whenever I press the ESC key, the "Disk & Devices" suddenly started coming up from the System Tray.

I found that a config appeared in System Settings -> Shortcuts for "Plasma".
I remove it but after resetting the system it appears again.

STEPS TO REPRODUCE
I just press the Esc Key and the "Disk & Devices" pops-up from System Tray.

EXPECTED RESULT
The default and typical Esc key behaviour.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 5.22
KDE Frameworks Version: 5.83
Qt Version: 5.15.3
Comment 1 Sebastian Gauna 2021-06-15 04:09:33 UTC
Created attachment 139329 [details]
Settings

The configuration in question.
Comment 2 Sebastian Gauna 2021-06-15 04:09:42 UTC
I just noticed that the configuration get's back without even restarting the system, I did nothing, I even went away from the computer and when I came back it was there again...
Comment 3 Nate Graham 2021-06-15 21:29:51 UTC
What happens if you click the trash can icon next to it?

What do you mean "after resetting the system" After turning it off and on again? Or deleting your settings?
Comment 4 Sebastian Gauna 2021-06-16 02:43:25 UTC
If I delete the setting with the trash can icon and then click Apply, everything gets back to normal until I restart the OS, that's what I meant by "resetting", restarting/rebooting the OS

I couldn't replicate the setting comming back without rebooting, I might probably have rebooted without remembering it when I thought the setting came back by its own without rebooting... I'll keep checking this. But I can assure you that rebooting the system gets the setting back even if I deleted it with the trash can and apply it.
Comment 5 Sebastian Gauna 2021-06-16 06:05:48 UTC
OK, I was several hours without rebooting and the setting didn't come back on it's own. So that means it only comes back after rebooting.
Comment 6 David Redondo 2021-06-16 07:00:41 UTC
Could you attach your kglobalshortcutsrc, after removing the shortcut from system settings?
Comment 7 Nate Graham 2021-06-16 15:00:34 UTC
(the exact file path is ~/.config/kglobalshortcutsrc)
Comment 8 Sebastian Gauna 2021-06-16 15:05:18 UTC
Created attachment 139392 [details]
kglobalshortcutsrc

Here it goes the file after removing the shortcut.
Comment 9 Sebastian Gauna 2021-06-16 15:05:46 UTC
I just uploaded the file, thanks for the path hint!
Comment 10 David Redondo 2021-06-16 15:32:44 UTC
Comment on attachment 139392 [details]
kglobalshortcutsrc

activate widget 275=none,none,Activate Disks  Devices Widget

So for kglobalaccel there is no shortcut

Could you also attach ~/.config/plasma-org.kde.plasma.desktop-appletsrc ?
Comment 11 Sebastian Gauna 2021-06-16 17:05:23 UTC
Created attachment 139399 [details]
plasma-org.kde.plasma.desktop-appletsrc
Comment 12 Nate Graham 2021-06-16 17:08:55 UTC
There it is:

[Containments][270][Applets][275][Shortcuts]
global=Esc

I guess the bug is that removing the shortcut from the KCM doesn't remove it from this file.
Comment 13 Sebastian Gauna 2021-06-16 17:17:37 UTC
But there's another thing, I never added that shortcut key configuration, it just appeared...
Comment 14 Bug Janitor Service 2021-06-17 07:50:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/279
Comment 15 Sebastian Gauna 2021-06-19 23:05:46 UTC
I installed KDE Neon in a VM, updated everything to leave it just like my primary OS, but I couldn't duplicate de issue.

So I presume that the bug in question is just that I can't delete the setting permanently, but not also that it appeared out of nowhere.

Probably some program caused this, but it should still be considered a bug the fact that I cannot delete the setting right?
Comment 16 David Redondo 2021-06-20 08:02:11 UTC
Git commit 3e006a0c42769356ea6ee1672692617a13f4710d by David Redondo.
Committed on 20/06/2021 at 08:01.
Pushed by davidre into branch 'master'.

Connect to global shortcut changes

The intent behind this code seemingly was that KGlobalAccel would
update the shortcut of the QAction but that is not the case. This
leads to our config going out of sync when global shortcuts are
changed from the oustide (the kcm) and resetting on next start
since we set shortcuts with NoAutoLoading.
FIXED-IN:5.84

M  +6    -1    src/plasma/applet.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/3e006a0c42769356ea6ee1672692617a13f4710d