On Tue, Dec 11, 2012 at 3:02 PM, Aaron J. Seigo <ase...@kde.org> wrote: > 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 > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel >
Could you post a link to that Qt 5.1 api when you find it again? I did a bit of searching, but nothing thus far. As for limiting it's usage. In my case that would not work. I need F5 as well in my app so i'm guessing other app developers "could" have the same requirement. Perhaps it's better to just use this component as a desktop component only? Is there any way to enforce that? _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel