Re: On-key-release keybindings
The Wanderer <[email protected]>
| Newsgroups | gmane.comp.window-managers.openbox |
|---|---|
| Organization | This space intentionally left blank. |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/30/2014 10:17 AM, Mikael Magnusson wrote: > On 30 April 2014 15:12, The Wanderer <[email protected]> wrote: > >> On 04/30/2014 08:54 AM, Alexey Korop wrote: >>> Unfortunately any X-based solution may conflicts with modifier >>> using of the Win key. >> >> Are you sure? >> >> If you bind Super_L to an action currently, yes, it breaks W-* >> bindings; the Super_L binding eats the KeyPress event, and the >> combo bindings never see the modifier key. >> >> However, I would intuitively expect that if you bind "Super_L >> KeyRelease" to an action, but leave the W-* bindings alone, then >> since nothing is bound to the KeyPress the W-* bindings would still >> be able to see it - and if you don't press another key, but just >> release Super_L, it would trigger the single-key binding. >> >> If someone has done the work to create a KeyRelease binding, and >> discovered that it doesn't work that way, I'd be interested to know >> it. But so far I haven't found any indication that anyone has even >> tried. > > What makes you think the release binding wouldn't trigger just > because you pressed another key in the meantime? It's entirely possible that it would. I'd still like to be able to find out, however, and to decide for myself whether the result is better than not having the binding at all. (And possibly to experiment with ways of preventing it from occurring, if necessary.) (I note that so far, no one seems to have answered the question I actually asked, rather than addressing the "background explanation" I provided as context...) > Yes, sure, you could write a lot of special case code that figures > out that Super_L is the key that caused that other key event we just > handled to have the Mod4 state bit set, and remember it, such that it > doesn't trigger. That's a lot of special case code for an extremely > fringey case though. And in the event that such code proves necessary, I don't think I'd expect it to be in OpenBox itself. I'd still like to have the option of writing such code for my own local usage, however (e.g. bind the event to a script or local binary with detection logic, which either triggers the "menu" event or exits having done nothing) - and doing that would still require the ability to react on KeyRelease, rather than on KeyPress. - -- The Wanderer Secrecy is the beginning of tyranny. A government exists to serve its citizens, not to control them. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJTYQqDAAoJEASpNY00KDJrg1oQAKzp5akkc3Fr81sB0jRUM/FN 3w94nIgSycl62eysMixJ/9dzVWNv3xrvggE5e2U3jik4kETf8ihMkKG6rMZTeXzW YLOlzjN5TZH1ktEzd97FswSHTtovlBEIzIjakr0HAPBqQ6rdaonhlXWfMI+KJAV4 YFJ9oUryvoJxakwjE/ui0IJ2CqEVvg4GttpIfZQgfm7yamVBvEvXhjFNqFgyDVFP lqgdYOTjJAK0AB8lF1ZF/DBFewnjm97k+cYYdhwSLqIiRcsaLcRAanGnm28aH3bA Pi1SQJ6PIc+sN5ORjttKtCJ7hdCBTzPmizpELmfgDr0CUqVC2EJyCwzZkxVng1Uh lzcFKEeL76QY2IVkPwbIZhmyOJlJqbhedlG0SxBdUSeU8ZknWilmb4LvaKv8tAQd AzKpJ+heMAYuKrRf35lJ4Vhbgq5lT/BCAKUQjSkbvDWB5OtHFdodvy/s2TZGSWyk /kMC3C08u+lVTOL/NHZXriMcvbHDJYJYKtnXJCEOR32MV4ouZmaRoh0aaWLUVS1X nNRL+dTKn4upae1kuVKrHNG0fp8z0UlaQNc8+WWlJlJv5n4WZHos7oVgEcqCphHJ GBHVrp9f/9BQzcBT86q9aCdTRTp15Mc/gNI9iWwaCt+UtHRJk5velibKOsDUyl6B SW6o6r2lK+nTwcYX3bGS =a8P4 -----END PGP SIGNATURE----- _______________________________________________ openbox mailing list [email protected] http://icculus.org/mailman/listinfo/openbox