Fwd: Global Shortcuts

Andreas Hartmetz ahartmetz at gmail.com
Thu Mar 6 16:56:15 GMT 2008

Am Donnerstag 06 März 2008 17:19:38 schrieb Michael Jansen:
> If i understood Andreas implementation correctly all that will bring the
> following behavior:
> When editing shortcuts from the application itself utilizing
> kshortcutseditor you will be able to assign a global shortcut to any
> action. That's exactly what David meant.
> When using the global shortcuts editor form kcmhotkeys you will NOT see all
> shortcuts of all applications. globalaccel only stores shortcuts that have
> currently a global shortcut assigned or are empty but have been enabled
> either by calling enableGlobalShortcut or by calling setGlobalShortcut with
> an empty KShortcut(). That what kwin is doing for example. So you will only
> see those shortcut and not all.
> So you have to use the application local shortcut editor to assign a global
> shortcut for actions currently not known to globaccel.
> That why i came to the conclusion an application developer would have to
> enable an global shortcut for an action explicit.
It's... complicated. I have done enough testing of the core of the new code to 
assume that it works :) and the KCM is next.
Michael: It would be good if you didn't touch the KCM this week so I can port 
it without interference. Also, your code is just fine. Your coding style 
however made me shake my head in disbelief. While kdebase is not kdelibs, 
please try to use a standard-ish style. Things like

        foo, bar,
        baz, blah

if (stuff)

foo(bar );


Q_FOREACH (blah, blarg) //it's not in a public header!

void Foo::Bar(
              Thing thing,
              Stuff stuff

and some weirdnesses with initializer lists bring tears to my eyes. Just don't 
do it. Please. I have changed these here in my local copy before making the 
other modifications. I can either check in those changes or you can do it or 
we can have an old-fashioned fist fight...
Again, the code itself is just fine. The formatting is such that I cannot 
touch the code without compulsively changing the formatting everywhere.


More information about the kde-core-devel mailing list