proposal for kaction api change

Hamish Rodda rodda at kde.org
Fri May 5 16:37:01 BST 2006


On Saturday 06 May 2006 00:47, David Faure wrote:
> On Friday 05 May 2006 16:29, Hamish Rodda wrote:
> > > > enum ShortcutType {
> > > >       /// normal shortcut
> > > >       Shortcut = 0x1,
> > > >       /// default shortcut
> > > >       DefaultShortcut = 0x2
> > > >       /// global shortcut
> > > >       GlobalShortcut = 0x4
> > > >       /// default global shortcut
> > > >       DefaultGlobalShortcut = 0x8
> > > >     };
>
> I don't understand this. Isn't an action -either- global or non-global
> (local to an application) ? In particular, most action are not global, and
> Alt+F2 is global, and only global. What do I miss?

As it stands, there is not currently any checking on local vs. global shortcut 
conflicts.  So, kwin's global shortcuts could also be assigned to actions in 
another app, and if i'm not mistaken, both the local action and the global 
action would be invoked when the shortcut was pressed with the other app 
focused.

Having said this, once dbus hits mainline I plan to refactor the global 
shortcut support out into a kded module, and from there apps can coordinate 
their global shortcuts from a central repository.

It is certainly possible for an action to have both local and global 
shortcuts, e.g. in a media player, play could be "ctrl-p" locally, and 
"win-p" or Qt::Key_MediaPlay globally; such is the beauty of actions 
supporting global and local shortcuts :)

Hope that clears it up a bit.

Cheers,
Hamish
-------------- 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/20060506/9ac79a8b/attachment.sig>


More information about the kde-core-devel mailing list