Keyboard shortcuts and applets

Aaron J. Seigo aseigo at kde.org
Tue Apr 14 01:25:20 CEST 2009


On Monday 13 April 2009, Emdek wrote:
> On Monday 13-04-2009 19:39:00 Aaron J. Seigo wrote:
> > On Sunday 12 April 2009, Emdek wrote:
> >> On Sunday 12-04-2009 18:23:00 Aaron J. Seigo <aseigo at kde.org> wrote:
> >> > On Sunday 12 April 2009, Emdek wrote:
> > yes, i don't think it's worth it for the benefit.
>
> Ok, but I'm still thinking that there could be some general information on
> shortcut page, that says that triggering that shortcut will gave keyboard
> focus to that applet etc. What do you thing about this kind of description?

it would mean:

* another setter in Applet
* another QString we hang onto for the life of the Applet object

couldn't we just put a generic "Activate" string there instead? not precise, 
but i'm not sure precision matters here (esp at the costs above)

> > when creating the shortcuts page, go through all actions in d->actions
> > and add
> > them to the page.
>
> So maybe there could be added method that returns list of actions that we
> want to add to configuration dialog, similar to that for contextual
> actions?

we already have an addAction() method. if the action is added there we can 
allow a shortcut for it.

> Then we could check if it is global or not using
> isGlobalShortcutEnabled() and then display two group boxes, one for local
> and one for global shortcuts.

right ... or we could just use the KShortcutsEditor widget there even, after 
filtering out the 'global' actions (remove, configure, etc)

> So what solution you suggest for that problem when we want to use
> activated() to tell panel to unhide (like in Tasks applet) and use it's
> activation shortcut to perform action? Should be there added new action
> with global shortcut?

the panel unhiding and activate() being called are two wholey unrelated 
activities. in fact, panel unhiding is completely transparent to Containment 
and must remain that way (it's a View thing, and in this case a View thing in 
plasma-desktop; don't think of "plasma" as "that binary called plasma-
desktop", as plasma-desktop is just one possible incarnation of things, and 
those other things may have no panels or no panels that can hide; this means 
that Containment and View must be kept as separate as possible.)

so when the global shortcut is triggered, the applet will say "hey, i think i 
need to be seen now" and that will percolate up through the containment and 
then thew view might say "oh, i have to do something special now"

for DesktopView that might mean calling forward the dashboard or invoking 
"show desktop"; the PanelView that might mean unhiding. for another View it 
might mean nothing at all :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090413/8daf3285/attachment-0001.sig 


More information about the Plasma-devel mailing list