Bug 347383 - Default shortcuts reset after closing dolphin, create ambiguity with custom shortcuts
Summary: Default shortcuts reset after closing dolphin, create ambiguity with custom s...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-07 13:30 UTC by Soukyuu
Modified: 2015-09-01 03:19 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soukyuu 2015-05-07 13:30:33 UTC
I have updated from the stable dolphin to dolphin-git and now all my shortcuts keep resetting to default once dolphin is closed. This makes any custom shortcuts I made turn ambiguous. 

Example: ctrl+shift+n is "new tab" by default, I mapped that to "create new folder". Upon restart ctrl+shift+n is mapped to BOTH "new tab" and "create new folder" again.

Reproducible: Always

Steps to Reproduce:
1. set shortcuts to default
2. set ctrl+shift+n to "create folder"
3. accept shortcut reassignment
4. press ctrl+shift+n
5. restart dolphin
6. press ctrl+shift+n

Actual Results:  
before restart: new folder dialog is opened
after restart: "shortcut is ambiguous" message is displayed

Expected Results:  
new folder dialog should open after restart as well

I'm on commit 7550ef029988626ba6249f1de90e2a42e7a9f632, since everything after that seems to require kf5.10 to build. I have tried removing dolphinrc, khotkeyrc, kglobalshortcutrc in my .config folder and also removing .local/share/dolphin folder, but the problem persists.
Comment 1 Achilleas Koutsou 2015-05-07 17:10:39 UTC
I have noticed this (and similar) behaviour with Ktp-text-ui (Chat window) and Standard Keyboard Application Shortcuts.

I'm still using Plasma packages 5.2.2 and it seems to be making a mess of the key bindings inside ~/.config/kdeglobals.
For instance, the default Quit key binding is Ctrl+Q.
In kdeglobals, it appears as:
Quit=Ctrl+Q;\s
Comment 2 Achilleas Koutsou 2015-05-07 17:28:17 UTC
Previous comment was accidentally submitted before finishing. Rewriting below:

I have noticed this (and similar) behaviour with Ktp-text-ui (Chat window) and Standard Keyboard Application Shortcuts.

I'm still using Plasma packages 5.2.2 and it seems to be making a mess of the key bindings inside ~/.config/kdeglobals.
For instance, the default Quit key binding is Ctrl+Q.
In kdeglobals, it appears as:
Quit=Ctrl+Q;\s

Changing a different shortcut, say Configure Notifications to Ctrl+#, and applying, changes Quit to:
Quit=Ctrl+#; Ctrl+Q

Changing something else again appends more Ctrl+Q to the line (and other lines) which makes the file look like this:

Print=Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P
Prior=PgUp; PgUp; PgUp; PgUp; PgUp; PgUp; PgUp; PgUp; PgUp; PgUp
Quit=Ctrl+#; Ctrl+Q; Ctrl+Q; Ctrl+Q; Ctrl+Q; Ctrl+Q; 
Redo=Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z; Ctrl+Shift+Z
Reload=F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh; F5; Refresh

I think this makes for some strange behaviour when changing a function's main and alternate shortcut. It makes the function retain a shortcut beyond just the secondary alternate. For instance, changing Print's main and alt, I now have this in the file:
Print=Ctrl+/; Ctrl+?; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P; Ctrl+P

and using Ctrl+P in Kate pops up the ambiguous shortcut warning.

I know my comment is a bit of a mess. I was having a hard time putting my finger on exactly what was happening, but I suspect the underlying cause is related to this bug.
Comment 3 Soukyuu 2015-05-08 00:09:41 UTC
I looked at my ~/.config/kdeglobals and the only thing related to hotkeys is the [KShortcutsDialog Settings], but it only contains the dialog size. At this point I'm not sure where exactly dolphin is pulling its config from.
Comment 4 Frank Reininghaus 2015-05-14 15:01:52 UTC
Thanks for the bug report. If I understand correctly, this is not a Dolphin-specific issue, but can also be reproduced in other KDE applications. Therefore, I would guess that it's a problem with the kglobalaccel framework.
Comment 5 Martin Flöser 2015-05-14 15:15:01 UTC
@Frank: are you sure this is about global shortcuts? I just did a git grep on KGlobal in dolphin sources and it didn't find anything
Comment 6 Frank Reininghaus 2015-05-14 15:19:19 UTC
Sorry Martin, I got that wrong. Non-global shortcuts are handled by kxmlgui, so this is hopefully the right product. Sorry for the noise.
Comment 7 Achilleas Koutsou 2015-05-14 15:59:19 UTC
I keep experiencing a lot of strange behaviour that's related to this bug but it's hard to reproduce. At the risk of creating noise, I'm going to list some of the things that happened as I think it might be helpful in the long run.

I was changing some keyboard shortcuts in Application Keyboard Shortcuts. Generally, I've been trying to change the cursor behaviour so its closer to the behaviour in the command line (readline). For example, set Ctrl+W to delete word instead of close tab, Ctrl+A to beginning of line instead of Select All.

A few minutes ago I noticed that Ctrl+A was doing "Select All" in Krunner. Application Keyboard Shortcuts had Ctrl+A listed as a shortcut for both Select All *and* Beginning of Line. Changing Select All to "None" prompted a conflict warning against every function in the Application Keyboard Shortcuts configuration window.

Eventually, I resolved it by editing ~/.config/kdeglobals manually.
Note that, as I mentioned in a previous comment, each function again has a string of 5-6 shortcuts, instead of just 2.

I hope this is all relevant. I suspect the original issue and my issues are related to the string of shortcuts that are saved in kdeglobals, e.g., a shortcuts conflicts with the third, or fourth shortcut in a list, and that shortcut doesn't appear in the configuration window that shows only 2.
Comment 8 Soukyuu 2015-05-14 19:22:25 UTC
After arch updated their stable repos with kf5.10, I have rebuilt dolphin-git again and the problem with the shortcuts just went away. I'm not sure if it was something about that commit I was on and I just got lucky, but the issue is not present for me at this time, anymore.
Comment 9 Simon Persson 2015-09-01 03:19:25 UTC
Closing as the original reporter confirms the issue is gone.
The comments from  Achilleas Koutsou  about it being a general issue is wrong. There is a general issue like what he describes, bug 343665, but that is separate from this one.