[openbox] On-key-release keybindings
wanderer at fastmail.fm
Wed Apr 30 10:36:51 EDT 2014
-----BEGIN PGP SIGNED MESSAGE-----
On 04/30/2014 10:17 AM, Mikael Magnusson wrote:
> On 30 April 2014 15:12, The Wanderer <wanderer at fastmail.fm> 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
> 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
(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.
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/
-----END PGP SIGNATURE-----
More information about the openbox