Bug 228588 - setting shortcut for Help is switching back to F1
Summary: setting shortcut for Help is switching back to F1
Alias: None
Product: systemsettings
Classification: Unclassified
Component: kcm_standard_actions (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Michael Jansen
Depends on:
Reported: 2010-02-26 09:54 UTC by marcela maslanova
Modified: 2011-04-25 06:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

Patch to simply not add actions if the shortcut is already added. (1.41 KB, patch)
2010-12-14 18:21 UTC, Simon Persson

Note You need to log in before you can comment on or make changes to this bug.
Description marcela maslanova 2010-02-26 09:54:35 UTC
Version:           1.0 (using KDE 4.4.0)
Compiler:          gcc-4.4.3-4.fc12.x86_64 
OS:                Linux
Installed from:    Fedora RPMs

After switching off short-cut for Help or redefining to e.g. F12 is switched back. I made the change, click on apply, close system-settings and try to press F1. Help was opened again. After check of system-settings the short-cut is switched back to F1.

This is especially inconvenient because instead of switching to first desktop I'm opening Help often they I wanted.
Comment 1 Michael Jansen 2010-03-06 21:19:51 UTC
The Problem is that the KStandardShortcut::Help is associated with two KStandardActions.

The same problem applies to:

KStandardShortcut  KStandardActions
Paste             | Paste, PasteText
Help              | Help, HelpContents

on a first check. Why this was done i have no idea. Both actions show up in the kcm. If the first has it's shortcut changed on saving the second unchanged action overwrites the change again and therefore nothing happens.

As a workaround change the shortcut of the "System Settings Handbook" action. I will have to find a solution for this problem.
Comment 2 Simon Persson 2010-12-14 18:21:13 UTC
Created attachment 54552 [details]
Patch to simply not add actions if the shortcut is already added. 

Comment from kstandardaction_p.h:

// the idea here is that Contents is used in menus, and Help in dialogs, so both share the same
// shortcut
{ Help,          KStandardShortcut::Help, "help", 0, 0, "help-contents" },
{ HelpContents,  KStandardShortcut::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "help-contents" },

Simply not adding any further actions with the same shortcut fixes the problem. Also I think it looks better to not have the confusing entry "system settings handbook" there.