Farewell KAccel, you have served us well

Hamish Rodda rodda at kde.org
Thu Mar 30 10:04:43 BST 2006


On Thursday 30 March 2006 04:44, Olivier Goffart wrote:
> Le Lundi 27 Mars 2006 16:05, Hamish Rodda a écrit :
> > As an added bonus, I noticed that from an api design perspective, it made
> > more sense to allow any KAction to be associated with a global
> > accelerator, rather than to special case it as was the case in the past. 
> > So, now you can assign (programatically at least, gui to follow) a global
> > accelerator to any KAction.  imho it is a gain, but not as large as it
> > might first seem (many actions need focus to do something meaningful for
> > the user).  I also abstracted most of the bookkeeping out of
> > KGlobalAccelPrivate and into KGlobalAccel itself, so that the (now
> > renamed) KGlobalAccelImpl class can concentrate on doing
> > platform-specific tasks only.  KGlobalAccel is now a singleton.
> I'm not sure if it is fine.
> For most actions, global shortcut make no sens:
>   - some actions need, like you mentioned, something focussed or selected


>   - if not, which action to trigger if several windows of the same
> application are open ?

If it is the one process and the one action plugged into multiple windows, 
that's fine.  Else there should be multiple actions with different 
configurations, or (as you suggest) they should not have a global 

>   - and what if several instance of the same applications are open.

One keypress would activate all.

> Actions that could have a global shortcut are very specific. (thoses
> plugged into the systemtray menu)
> Also, is there a use case of having both a local and a global shortcut ?

I think so, eg. XF86Play as a global play shortcut, and (esp. for those who 
don't have a special play button) eg. Ctrl-P as a local shortcut.

However, I think your argument is sound...

> An idea is to have two flags:
>   1- Does it make sens to have a global shortcut ?   (set by the
> programmer)

I'll add this.  The question is though, should it default to true or false?  
I'm thinking false.

> 2- Is the shortcut global  (set in the config) 

Of course, this is already done.

> Another almost unrelated thing:
> I'd like to be able to execute one action with dcop^W dbus
> In order the make the mouse gesture and voice trigger configurable in the
> application configure shortcut dialog. The khotkey deamon must know which
> action collection is "active" (if the window has actually the focus).  And
> must be able to execute the action.

I can certainly add this, perhaps after the dbus bindings are ready?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060330/837ec25b/attachment.sig>

More information about the kde-core-devel mailing list