Fwd: Global Shortcuts

Michael Jansen kde at michael-jansen.biz
Thu Mar 6 16:19:38 GMT 2008


On Wednesday 05 March 2008 13:36:01 Andreas Hartmetz wrote:
> Am Dienstag 04 März 2008 00:45:42 schrieb Michael Jansen:
> > On Monday 03 March 2008 14:25:05 David Faure wrote:
> > > I thought "globalShortcutAllowed" was more of a setEnabled() call;
> > > enabling/disabling the shortcut at a given time, with the possibility
> > > that a change in the state of the application might toggle this later on.
> >
> > Looking at andreas patch i would say's youre understanding was correct. I
> > will fix kcm_keys when andreas commits.
> >
> Right, my patch also tries not to change existing behavior *too much* so that 
> applications won't need much porting. The main rationale is that the kdelibs 
> code is released now so breaking any old compiled application *at all* is a 
> no-no. That will not be fulfilled in all cases but it will in my opinion (and 
> there were no protests really) be close enough.

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.



Mike


-- 
Michael Jansen
Available for contract work ( Development / Configuration Management )
http://www.michael-jansen.biz




More information about the kde-core-devel mailing list