[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Responding to shortcut release
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2008-11-11 16:22:24
Message-ID: 200811111722.24185.l.lunak () suse ! cz
[Download RAW message or body]
On Saturday 08 of November 2008, David Nadlinger wrote:
> I'm currently working on a small but in my opinion valuable
> enhancement to Present Windows: an option to return from the effect
> when the user releases the associated key shortcut (like if they had
> pressed the mouse button). I have really come to like this "feature"
> in compiz because it allows for faster window switching, especially
> when using a touchpad.
Maybe it would be enough for you just to set up PresentWindows as the effect
for Alt+Tab? That one already has this feature.
> However, I am lacking a way to react to the release of a KAction
> globalShortcut. The only thing I could come up with is an ugly
> workaround, which is not even fully functional:
> http://gist.github.com/23091. Are there any smarter ways to archive
> this?
I assume by releasing you mean the same way Alt+Tab works, i.e. releasing all
the keys in the shortcut, not just one. Not exactly trivial. The code for
Alt+Tab isn't either. I suggest you simply try reusing that code, see
tabbox.cpp, mainly areModKeysDepressed() I think.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic