API changes to global shortcuts - let's get it over with...
Hamish Rodda
rodda at kde.org
Wed Jul 11 04:28:23 BST 2007
On Wednesday 11 July 2007 02:16, Andreas Hartmetz wrote:
> Hello list,
>
> I would like to announce some changes to the way global keyboard shortcuts
> will be handled, likely due next monday. I tried tried to make
> "interesting" corner cases and conflicts impossible to create. Not having
> much application experience myself, I had a real life chat with Martin and
> Max(?) of Amarok. Here is a short description of what we came up with:
>
> -When KAction::setGlobalShortcut() or ::setGlobalShortcutAllowed() is
> called for the first time ever on a KAction identified by a
> mainComponentName/actionName pair, the then active shortcut is stored in a
> KDED module.
> -Whenever the action's "global shortcut allowed" flag is set in subsequent
> runs of the application, the stored value is loaded and, for
> setGlobalShortcut() (which sets this flag), the shortcut passed will be
> just ignored. If you *really* want to *change* the shortcut to something
> different programmatically you can indicate this by setting a flag
> noAutoloading. Note that this is something your users are not likely to
> want except if they asked for it.
> -Conflicts will be avoided by just zeroing out any offending new shortcuts.
> The result will be saved as always.
> -All global shortcut settings will automatically be made persistent by
> storing them in a config file.
> -As mentioned in earlier mails, no multi-key global shortcuts like
> Ctrl+A,B. Apparently there is no way to implement these in non-hacky ways
> on at least (X11, Mac).
>
> This seems to be the best compromise to solve this boring problem...
>
> Incompatible changes are:
> -removal of KGlobalAccel::readSettings() and ::writeSettings()
> -semantic changes to KAction::setGlobalShortcut[Allowed]()
> and behind the scenes, most things will be handled in a DBus-enabled KDED
> module.
Thanks for doing this, I always wanted to do it but didn't find the time.
Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070711/9a9bc51a/attachment.sig>
More information about the kde-core-devel
mailing list