RFC: Application wide shortcuts in QML

Aaron J. Seigo aseigo at kde.org
Tue Dec 11 14:02:57 UTC 2012


On Friday, December 7, 2012 22:39:09 Mark wrote:
> Hi,
> 
> I just made this blog post [1] and would like to see if i can include
> this - quite handy - QML component in the KDE imports. I think it fits
> quite nicely in the "qtextracomponents" import.
> 
> The syntax is as follows (in QML):
> Shortcut {
>     key: "Ctrl+C"
>     onActivated: {
>         console.log("JS: " + key + " pressed.")
>     }
> }

>From discussions had recently with qt devs, this will likely be coming in Qt 
5.1. I forget the exact API decided on (or if it has been decided on), but I'd 
be Ok with it only if the API of this component was the same as the Qt5 API 
will be so we don't have to maintain this API forever.

I'm also very hestitant to encourage plasmoids to implement app-wide key 
shortcuts. Might be nice(r) to automatically require ctrl (so it would be 
just: key: "C") or some other modifier or even just disabled when in a shared-
space formfactor (vertical, horizontal, planar..); these need to be able to be 
kept manageable so plasmoids don't capture the same shortcuts (easy when you 
can have more than one instance of the plasmoid :)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121211/c96bbf18/attachment.sig>


More information about the Plasma-devel mailing list