From kde-core-devel Sat Jul 08 12:59:28 2006 From: Hamish Rodda Date: Sat, 08 Jul 2006 12:59:28 +0000 To: kde-core-devel Subject: Re: modifier-only shortcuts Message-Id: <200607081459.30874.rodda () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=115239348222610 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1325493.2CDNfVnEH5" --nextPart1325493.2CDNfVnEH5 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 passi= ve > 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 on= ly=20 shortcuts to qt. So, as far as I can see, you'd need a process listening t= o=20 every single keystroke in order to tell when to activate this shortcut. =20 Granted, seeing that I'll be moving global shortcuts out to a kded process,= =20 this may be a bit cleaner to do, but not by much. Then there's the issue o= f=20 when the shortcut is supposed to be at application or window level rather=20 than global. I don't have much to say on the non-technical side other than I can see why= =20 some people want this feature, and if I can do it sanely then perhaps it=20 could be opt-in. Cheers, Hamish. --nextPart1325493.2CDNfVnEH5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBEr6wyH8BtnSmIlUYRAn+0AJsG7Txr0SyFYykBgVAtryvqUJ2FmgCgqCde fRDyOXTdEjVVUuR05/LOE+U= =X90J -----END PGP SIGNATURE----- --nextPart1325493.2CDNfVnEH5--