You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Previously we had different logic for direct key presses and client-side key repetition, as one queued up input events and the other dispatched them directly (client-side key repetition is run from the main thread). I kinda figured out that this difference doesn't really matter, as we can queue them up before the thread message dispatching logic. That's exactly what we do now, which allows us to make a single method for both of them, making the code much clearer and simplifying future maintenance. This patch also includes a tiny fixup in the compose logic, which checks for the validity of the generated key event before actually working with it. The cases in which we can end up with an invalid reference are very few, so it's not the end of the world, but it's still absolutely a good idea to check, to avoid nasty surprises down the line.
73 KiB
73 KiB