From kde-core-devel Fri Jul 07 14:21:08 2006 From: Lubos Lunak Date: Fri, 07 Jul 2006 14:21:08 +0000 To: kde-core-devel Subject: Re: modifier-only shortcuts Message-Id: <200607071621.08876.l.lunak () suse ! cz> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=115228208121149 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. L