Bug 345807

Summary: multiple hotkey settings written into kdeglobals cause hotkeys unusable
Product: [Applications] systemsettings Reporter: farseerfc
Component: kcm_standard_actionsAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: anohigisavay, freddie_chopin
Priority: NOR    
Version: 5.2.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
URL: https://www.youtube.com/watch?v=kzf-_sGWx-0
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description farseerfc 2015-04-02 15:01:49 UTC
By applying "default" hotkey settings for multiple times, the file  ~/.config/kdeglobals will contain multiple hotkeys for each action in the "Shortcuts" section, which result to shortcuts be unusable in qt5 applications such as kate.

By deleting the whole "Shortcuts" section in ~/.config/kdeglobals , the function of shortcuts will recover in the said applications.

I record a video to demonstrate this bug (sorry for using the Chinese locale):
https://www.youtube.com/watch?v=kzf-_sGWx-0 

Reproducible: Always

Steps to Reproduce:
1. Open systemsettings5, Shortcuts, Application Keyboard Shortcuts
2. Click "Default" button in the bottom, and then click "Apply"
3. Go back to overview
4. Repeat steps 1~3 for 2 times
5. Open Kate
6. Press Ctrl+O

Actual Results:  
A Dialog says:
The key sequence 'Ctrl+O' is ambiguous. Use 'Configure Shortcuts'
from the 'Settings' menu to solve the ambiguity.
No action will be triggered.

Expected Results:  
"Open File" dialog should be opened.

Look into the "Shortcut" section in "~/.config/kdeglobals" file, it will contain settings like this (part of the file):
Close=Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc; Ctrl+W; Ctrl+Esc
Copy=Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins; Ctrl+C; Ctrl+Ins
Cut=Ctrl+X; Shift+Del; Ctrl+X; Shift+Del; Ctrl+X; Shift+Del; Ctrl+X; Shift+Del

From my understanding, the settings should NOT append after each line, instead it should overwrite the existing settings.

By removing these lines, the shortcuts function recovered in kate.
Comment 1 Savor d'Isavano 2015-04-02 15:44:15 UTC
I have encountered the same issue.
Comment 2 Freddie Chopin 2015-04-08 15:34:46 UTC
That's the same problem as in https://bugs.kde.org/show_bug.cgi?id=343665
Comment 3 farseerfc 2015-04-09 01:30:27 UTC
(In reply to Freddie Chopin from comment #2)
> That's the same problem as in https://bugs.kde.org/show_bug.cgi?id=343665

Oh I didn't find that bug report, thank you for point out.
This bug report should be marked as duplicate.

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