modifier-only shortcuts

Hamish Rodda rodda at kde.org
Sat Jul 8 13:59:28 BST 2006


On Friday 07 July 2006 16:21, Lubos Lunak wrote:
> On Friday 07 July 2006 14:11, Chusslove Illich wrote:
> > >> [: Aaron J. Seigo :]
> > >> and it's a "proper" command sequence involving a control key and a
> > >> non-control key that isn't used for anything else i can really think
> > >> of.
> > >
> > > [: Alexander Dymo :]
> > > This would be alt+space on intel, right?
> >
> > Bloody hell, how did nobody think of this before? Now I tried, and of
> > course it works. Should we make it default?
>
>  I'd suggest so, because it seems to make sense (and we can claim we're
> like Apple and not like Windows :) ).
>
>  Moreover, one more reason against modifier-only shortcuts, besides the
> already mentioned ones, is purely technical. It's bloody difficult, or
> maybe even impossible, to do it correctly. As long as correct includes not
> killing all other shortcuts using that combination. Remember the
> Win-key-alone-opens-K-Menu feature? There were always some problems with
> it.
>
>  Basically, you're not notified of key events if you don't have focus
> unless you have keyboard grab (active or passive). You can set up a passive
> grab on a modified combination, but for other shortcuts using these
> modifiers to work you have to let go of the grab and then you have no
> way[*] to find out if actually the user pressed something more or only the
> modifiers. If you don't let go of the grab and instead try to forward the
> presses, well, that's what the K-Menu code tried and apparently nobody
> managed to get that working 100%.
>
>  If you think you really want support for that in kxkb, you can try your
> luck, but you'll probably have to use XGrabKey() directly and allow to
> differentiate between left and right modifiers (using e.g. right Alt+Ctrl
> and as such disabling it for everything else seems to be harmless, I don't
> think I've ever used them for any shortcut).
>
> [*] Might be there would be some X extension for input that'd give this
> information somehow, but there's nothing like that in core X and I don't
> know about extensions.

Simon + I talked about this.  TT will not be adding support for modifier only 
shortcuts to qt.  So, as far as I can see, you'd need a process listening to 
every single keystroke in order to tell when to activate this shortcut.  
Granted, seeing that I'll be moving global shortcuts out to a kded process, 
this may be a bit cleaner to do, but not by much.  Then there's the issue of 
when the shortcut is supposed to be at application or window level rather 
than global.

I don't have much to say on the non-technical side other than I can see why 
some people want this feature, and if I can do it sanely then perhaps it 
could be opt-in.

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060708/ef7b1cea/attachment.sig>


More information about the kde-core-devel mailing list