Closed main-- closed 7 years ago
It's not pretty
is the largest euphemism that I've seen in quite some time!
Can't we hold state about which keys are pressed and released and release only the pressed ones? Or couldn't we just release the keys registered as the hotkey (even though that wouldn't release any other pressed keys, which imho wouldn't be too much of a problem though)?
which imho wouldn't be too much of a problem
Your opinion is bad - this is a huge problem. We're talking about keys that you literally cannot release no matter what you try to do (basically a windows version of that libinput bug I found).
Can't we hold state about which keys are pressed and released and release only the pressed ones?
Sure we could but why bother? Not to mention that the whole thing is going to be racy either way... Right now all we just remember modifiers (as they are important for hotkeys), extending that for keys as well wouldn't be too hard but then we run into architectural issues: The object where this data lives is inside a closure somewhere. Did I mention that it holds a reference to the controller because it has to trigger hotkeys? The only way to do this is by some rather complex channel shenanigans - and our data flow is already complicated enough.
It's not pretty but what can we do.
Needs more testing.