Open ahicks92 opened 1 week ago
Agreed. The disadvantage seems tolerable. It is unlikely that someone is going to rebind this one sub-feature and not the others when they originally all have the same keybind. I am most hesitant about left bracket itself but for the others it should be fine.
[ is our biggest problem. It's O(N^2) to figure out if it's right (each callback requires reasoning about all others and it's not a transitive relation). The bugs usually specifically show up there.
Here's an alternative if it really comes up. We can make a bunch of action-specific keybinds that do exactly one thing and leave them all unmapped by default. Then it can be their problem if they're going to try to fiddle around with remapping the whole thing for something as core as [. For now we don't bother but if we get a lot of requests we just come back and do that. What do we think?
For what it's worth my scanner experiments have lead to me seeing input go weird at low UPS so I am less confident in other approaches. I haven't tried to figure out what weird specifically means, nor do I care to. I've got enough other problems.
Capturing stuff discussed elsewhere and on Discord. We have a problem: when multiple inputs share the same keys, it's a combinatorial explosion to make it actually exclusive. We need to handle that. To do so:
fa-leftbracket
.try_first_thing(event) or try_second_thing(event) or...
. That's literalor
. It'll stop at the first one that did something.In future, for new things, we almost certainly want the conditions in the handler, e.g.:
But the advantage to the above is that it is almost an entirely mechanical process that should solve the problem without introducing bugs or instabilities, while guaranteeing that only one input ever triggers.
Disadvantage: we break remapping individual actions. We break current configs. Advantage: we stop having multiple "multiple inputs fired" bugs a month. Also unlocks some UI stuff.