Bug 313621 - Cannot create two standard shortcuts with the same key bindings
Summary: Cannot create two standard shortcuts with the same key bindings
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: shortcuts (show other bugs)
Version: 4.7.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-21 13:48 UTC by Dmitry Kazakov
Modified: 2013-01-21 20:53 UTC (History)
0 users

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 Dmitry Kazakov 2013-01-21 13:48:58 UTC
I guess this is related to KShortcutsEditor and the whole KShortcut system.

The usecase: 
I want that standard "Full Screen" action would be accessible with "Ctrl + F" shortcut. When I set it with "Configure Desktop" dialog, it suggests me to reset my "Find..." shortcut, which is obviously set to the same key sequence. Of course I don't want to do that.

Having both shortcuts set to the same key sequence is rarely a problem. For example Gwenview application doesn't have "Find..." action at all. So there will be no conflict if "Full Screen" is set to "Ctrl+F".

Current sutuation:
1) As far as I understand, KActionCollection currently allows adding (from the code) two actions with the same shortcut and both (?) of them are triggered when the user presses the specified key. 
2) KShortcutsEditor doesn't allow adding a shortcut, which conflicts with others.

Probable solution:
I guess, the shortcuts should have some priority. Currently, each action has a Primary and Alternate shortcuts. So when its first shortcut is overridden (in a specific application) by some other shortcut, it could start using its alternate shortcut.

For example:
"Find..." action has a priority 100. Primary shortcut: Ctrl+F
"Fullscreen" has a priority 10. Primary shortcut: Ctrl+F, Secondary shortcut: Ctrl+Shift+F

So in Gwenview I would have:
"Fullscreen" --> Ctrl+F

In Kate:
"Find..." --> Ctrl+F
"Fullscreen" --> Ctrl+Shift+F

Sorry for such a long description! =)

Reproducible: Always
Comment 1 Dmitry Kazakov 2013-01-21 14:01:35 UTC
Git commit 97cbbb49b9070cb956646deb0867856655eb34ea by Dmitry Kazakov.
Committed on 21/01/2013 at 14:58.
Pushed by dkazakov into branch 'master'.

Changed default shortcuts as suggested by David Revoy

This patch fixes most of the shortcuts mentioned in the bugreport except:

"Save As..." -- this is a standard KDE shortcut, so you can configure
                with a Configure Desktop dialog

"Fullscreen" -- this is a standard shortcut as well, but you can't easily
                set it to "Ctrl+F" due to bug 313621 in KDE shortcuts
                system.
Related: bug 313217

M  +11   -0    krita/image/kis_base_processor.cpp
M  +13   -0    krita/image/kis_base_processor.h
M  +1    -0    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp
M  +1    -0    krita/plugins/filters/example/example.cpp
M  +1    -0    krita/plugins/filters/levelfilter/kis_level_filter.cpp
M  +1    -1    krita/plugins/tools/defaulttools/kis_tool_move.h
M  +2    -1    krita/ui/kis_filter_manager.cc
M  +1    -1    krita/ui/kis_selection_manager.cc

http://commits.kde.org/calligra/97cbbb49b9070cb956646deb0867856655eb34ea