| Summary: | Editing custom keyboard shortcuts changes the name shown in the list, but not the actual command until the kglobalaccel daemon is restarted | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Pavel Urusov <pavel.urusov> |
| Component: | kcm_keys | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | major | CC: | bharadwaj.raju777, dmatteo002, fanzhuyifan, info+kde, jay, karthidreamr, kde, kdedev, mira.jary, nate, smowtenshi, vse.stopchanskyi |
| Priority: | HI | ||
| Version First Reported In: | 6.0.4 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | screenshot that shows that the displayed name and the actual command do not match | ||
Can reproduce. So the file on disk gets changed correctly, but after doing so, the code doesn't reload the action with KGlobalAccel. As a result you have to restart either KGlobalAcceld (on X11) or kwin_wayland (on Wayland) for the change to take effect. kglobalacceld loads `KService`s for each .desktop file. I experimented with making every service component reload its service whenever KSycoca signalled a database change, and this partially solves it. With this change, whenever you change the command, the immediate next press of the shortcut uses the old command but after that it switches over to the new one. Don't know why that's happening yet, will have to investigate. *** Bug 489529 has been marked as a duplicate of this bug. *** (In reply to Bharadwaj Raju from comment #3) > kglobalacceld loads `KService`s for each .desktop file. I experimented with > making every service component reload its service whenever KSycoca signalled > a database change, and this partially solves it. With this change, whenever > you change the command, the immediate next press of the shortcut uses the > old command but after that it switches over to the new one. Don't know why > that's happening yet, will have to investigate. Passively waiting for database change signals from KSycoca might not be a great idea, as testing on my end, this often only triggers 10s of seconds after the edit finished. Maybe the kcm could try deleting and recreating the component? *** Bug 497726 has been marked as a duplicate of this bug. *** *** Bug 500856 has been marked as a duplicate of this bug. *** *** Bug 511599 has been marked as a duplicate of this bug. *** *** Bug 511579 has been marked as a duplicate of this bug. *** As workaround I also change the key combination, then click apply and finally change the key combination back to the previous one (and click apply again). To see the result, just click on some other shortcut and then back to the custom shortcut page. |
Created attachment 170077 [details] screenshot that shows that the displayed name and the actual command do not match SUMMARY If I create a keyboard shortcut with a wrong command and later edit it with the edit button, the displayed command changes in the list but the actual command that gets executed stays the same as the initial command. STEPS TO REPRODUCE 1. Go to System Settings -> Keyboard -> Shortcuts 2. Click "Add New" and select "Command or Script..." from the drop-down menu 3. Now edit the newly created shortcut to change the command. OBSERVED RESULT The name displayed in the list of shortcuts changes, but the actual command which gets executed remains the same as the initial command. Please see the attached screenshot: you can see that the shortcut is labeled "kwin-tile 3" in the list while the actual command on the right says "kwin-tile 4" EXPECTED RESULT The command that gets executed changes when the user edits the shortcut. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20240524 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.0 Kernel Version: 6.9.1-1-default (64-bit) Graphics Platform: Wayland