viability of implementing global shortcuts via KDED and DBus

Thomas Zander zander at kde.org
Fri May 11 06:44:08 BST 2007


On Friday 11 May 2007 02:46:43 Andreas Hartmetz wrote:
> I have recently reimplemented KGlobalAccel to implement proper global
> shortcut conflict resolution. To that end, every application has to
> have a list of all global shortcuts that has to be loaded from a global
> config file. This is neither space nor CPU efficient, especially at
> application startup time (bad!).
>
> It would be nice to have a KDED module that listens to keypresses like
> the current KGlobalAccel does and that also does the bookkeeping.
> As I have no DBus experience, there are some issues on which I am
> asking anyone with DBus/QtDBus knowledge for comments.

I suggest turning it around; let the application query some global object 
via dbus and get a list of conflicting keypresses only (low memory).
You should do this (shortly) after the app shown its window to avoid 
network latency slowing down the startup, but my guess would be that it 
would be faster than loading / parsing files from disk.

-- 
Thomas Zander
-------------- 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/20070511/88dcdbcb/attachment.sig>


More information about the kde-core-devel mailing list