Open KoBeWi opened 6 years ago
I wonder what would be better behavior though?, focusing on the script is really useful.
Yeah, it could focus, but not in a way that makes you type whatever character you happen to have pressed. Dunno, maybe set the input to "disabled" state until you release all keys or something.
No idea when it happened and if it's intended, but the editor no longer focuses on error. I mean, it still jumps to relevant line, but the game keeps the focus, so the unintended editor input no longer happens. Closing as fixed then ¯\_(⊙ʖ⊙)/¯
Reopening. The focus behavior I mentioned in the previous comment happens randomly and seems to be uncommon (not sure what happened during my previous tests). It might be a bug actually xd
So the original problem still exists.
I would suggest that the script editor gets focused after user lifts hands of the keyboard. It is SUPER annoying.
No, imagine an error happens when you hold a button. You won't notice it until you release the button. Also what happens between error and releasing? Does the game freeze? How do you even detect release if a window is not focused?
I already proposed a solution before - block input (at least in script editor) when editor gets focused, until the user releases all buttons.
Is this still on the radar? Am I the only one bothered by this?
@TheHorscht Please don't bump issues without contributing significant new information. Use the :+1: reaction button on the first post instead.
I opened a PR with a fix, but it's blocked by another issue.
How about highlighting the relevant line in the editor without focusing the text cursor? I don't know if it's possible to highlight a line though in Godot
Consider this: you have script which (partially) might look like this:
This is, say, enemy script. You now run your scene, go right and press Z to jump over enemy. BUT! Turns out player doesn't have health property. Your script now looks like this:
That's because Godot complained about the lack of property and tried to be useful by focusing your editor on that particular line. It didn't predict though that you are in the middle of jumping, still holding jump key (Z), so when your focus jumps on script editor your Z will now appear in the script. Bonus if you have two monitors and don't immediately notice the issue. Believe me, it happened enough times for me to create this issue >.>
Minimal reproduction project: TestProject.zip Just run it and hold Z.