[RFC] saving and loading of global shortcuts

Olivier Goffart ogoffart at kde.org
Wed Aug 22 23:36:27 BST 2007

Le samedi 18 août 2007, Andreas Hartmetz a écrit :
> Hello list,
> There is a design issue with KGlobalAccel which has no obvious "perfect"
> solution so I am asking for your input. A quick outline of the global
> shortcuts infrastructure in my local working branch:

> [Basic functionality]

> - When a key grab triggers, KdedGlobalAccel calls (via DBus) KGlobalAccel
> which tells the action to trigger.

This work fine with KUniqueApplication.  But when the application has several 
instance, which one do you take?   one randomly, or every?

Does it even make sens to have global shortcut for such applications ?
(I personally think global shortcut should be limited to actions that are in 
the systray menu)

> [Conflict resolution]

Does it works fine in another desktop? How does it manage conflict with 
non-kde applications shortcut ?

> [The issues]
> The problem, now, is about KGlobalAccel::readSettings() and
> writeSettings(). They tell KdedGlobalAccel to save/load the mapping of the
> calling
> applications's shortcuts to/from a global config file. If an application A
> which had some shortcuts changed by the user or automatically, to avoid
> clashes, loads without callling readSettings(), it might snatch some
> shortcuts that were reassigned and "belong" to application B. Same thing if
> the changes (to resolve conflicts) were never saved to disk. They will be
> gone after a restart of KDED.

I don't understand the problem...   Why would an application load without 
calling readSettings ?

The problem is a synchronisation problem between the application config and 
the KdedGlobalAccel ?  Why not delegate all the global shortcut config to the 
Kded entirely ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070823/467f594d/attachment.sig>

More information about the kde-core-devel mailing list