Bug 430635

Summary: Unable to set custom shortcuts from the settings application
Product: [Applications] systemsettings Reporter: Matheus <matheusfillipeag>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: benjarobin+kde, bobbywibowo, hans.vandewalle, matheusfillipeag
Priority: NOR    
Version: 5.20.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Matheus 2020-12-20 20:27:41 UTC
SUMMARY
Since 5.20.4 it is no longer possible to set custom shortcuts on the settings app.


STEPS TO REPRODUCE
1. Open the settings app, go to Shortcuts -> Custom Shortcuts.
2. Create a new one or go to the trigger tab for a existing one.
3. You will be unable to modify the shortcut with the little widget there.

OBSERVED RESULT
You try to type a shortcut an nothing is detected. This same widget still works on another applications like setting a shortcut for applets.


SOFTWARE/OS VERSIONS
OS: Arch Linux x86_64, DE: KDE Plasma 5.20.2, CPU: Intel i7-7700HQ (8) @ 3.800GHz, GPU: NVIDIA GeForce GTX 1050 Ti Mobile, GPU: Intel HD Graphics 630, Memory: 15.5 GiB
Comment 1 Matheus 2020-12-20 22:41:55 UTC
Dec 20 19:17:13 arch-matheus systemsettings5[305190]: kf.guiaddons: Cannot record without a window
Dec 20 19:17:13 arch-matheus systemsettings5[305190]: kf.guiaddons: Cannot record without a window


That is logged when I click on the shortcut widget.
Comment 2 Bobby Wibowo 2020-12-21 18:20:31 UTC
Can confirm I'm encountering the same issue on KDE neon 5.20, KDE Plasma 5.20.4, KDE Frameworks 5.77.0, Qt 5.15.2.

Can also confirm I'm getting the same short error message when running systemsettings5 from terminal, and trying to click on the shortcut widget:
kf.guiaddons: Cannot record without a window

And yes, this only happens with Custom Shortcuts specifically. Standard Shortcuts for integrated Applications/System Services/Common Actions work fine.
Comment 3 Matheus 2020-12-21 18:33:08 UTC
I tried many earlier versions of the systemsettings and had always the same problem. I tried:  
   5.19.90  
   5.20.0   
   5.20.2   
   5.20.3  
   5.20.4

So this might be a problem or a compatibility with the KDE framework I'm guessing.
Comment 4 Bobby Wibowo 2020-12-21 18:44:43 UTC
(In reply to Matheus from comment #3)
> So this might be a problem or a compatibility with the KDE framework I'm
> guessing.

From the looks of the error message, that's more likely yeah.

I tried exporting then importing the custom shortcuts group, in hope of editing the shortcuts from the exported file, as a temporary workaround kinda thing, unfortunately that didn't work as I expected it would.
To be specific, the steps were: export group, delete group, edit export file, import group.
Unfortunately, it seemed as if my changes to the shortcuts specifically were ignored completely.
Comment 5 Matheus 2020-12-21 18:51:03 UTC
I did exactly the same! Then I exported the group again and you can see that your edit isn't there anymore, the key is empty.

I also tried editing ~/.config/khotkeysrc, which is where all custom shortcuts seem to be stored at, but KDE isn't reloading this file and if I restart plasmashell with `plasmashell --replace` the key gets empty again. 

Maybe I just don't know how to properly reload this shortcut daemon? I didn't find much about it. Or maybe KDE's shortcut daemon is really completely broken this time.
Comment 6 Hans 2020-12-21 20:31:35 UTC
I can confirm I also have this issue.

The forementioned steps with the editing of the ~/.config/khotkeysrc file was to no avail for me either.

kf.guiaddons: Cannot record without a window is the same message I get in the console.
Comment 7 Benjamin Robin 2020-12-29 14:18:19 UTC

*** This bug has been marked as a duplicate of bug 430388 ***