kglobalaccel fixes

Sebastian Kügler sebas at kde.org
Tue Mar 11 12:54:56 UTC 2014


A quick heads-up: I'm looking into what's broken in our global shortcuts. 
Here's a quick run-down of my findings so far:

kglobalaccel has some brokenness in it. It used to poke into the privates of 
KGlobalShortcutInfo in order to create its own object in a cast. This code is 
disabled right now since the kglobalaccel (from kde-runtime) can't see the 
privates of KGlobalShortcutInfo (in frameworks/kglobalaccel). This is a 
porting problem which can be worked around by copying the header in. I think 
that's fine as a solution right now, since it will go away again quickly, once 
kde-runtime is split up. This makes exporting shortcut info from kglobalaccel 
work for me.

Editing shortcuts also has problems. We introduced a new parameter there, 
actionType, which tells whether the shortcut is an application shortcut, a 
widget shortcut, a global shortcut, and so on. Now there's one role in the 
model which doesn't know about this new API, and that's the role that allows 
to edit the shortcut -- the result: global shortcuts can't be edited. I have a 
patch fixing that, but need to test it a bit better.

With that in place, I could add a global shortcut to kwin to trigger the 
desktop grid effect -- hooray!

There's a bunch of other bugs in there, connected to storing and loading 
shortcuts which I'm also looking into.

One thing is a bit puzzling, perhaps someone knows how to go about this: The 
meta key behaves different now, when I edit a shortcut, it's accepted as soon 
as I press the meta key, so it's not seen as a modifier, but as a key of its 
own. This means that one can effectively (through the GUI) only assign "meta" 
to an action, but not, for example meta+arrow_left. Any ideas how to best fix 
this?

More hacking ensues...
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Kde-frameworks-devel mailing list