godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.61k stars 20.76k forks source link

Alt-tabbing stops input from registering that was pressed before alt-tabbing and is still held when alt-tabbing back #82745

Open ghost opened 12 months ago

ghost commented 12 months ago

Godot version

v4.1.1.stable

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Compatibility) - Intel(R) Iris(R) Xe Graphics (Intel Corporation; 31.0.101.4575) - 12th Gen Intel(R) Core(TM) i7-1260P (16 Threads)

Issue description

Alt-tabbing stops input from registering that was pressed before alt-tabbing and is still held when alt-tabbing back

For example if I press the left key on the script editor, the cursor moves to the left. If I hold down the left key, alt-tab away, and alt-tab back while still holding down the left key, the cursor will not move to the left after focus is regained. This also happens if I start pressing the left key while focus is not on the editor and alt-tab back. If I instead click on the icon in the bottom bar, the left press is recognized, so it's just alt-tab that this happens with.

This also happens with exported projects.

Steps to reproduce

See above

Minimal reproduction project

N/A

Calinou commented 12 months ago

Can you reproduce this in other engines/games?

ghost commented 12 months ago

Engines? Like unity?

ghost commented 12 months ago

Okay I opened factorio and did the same thing and it didn't move the character. Maybe this is just a thing computers do

Calinou commented 12 months ago

Okay I opened factorio and did the same thing and it didn't move the character. Maybe this is just a thing computers do

Indeed, I believe this is intended behavior too. Since this happens in pretty much every application, I'm not sure if (or where) it should be documented.