Description
Godot version
master (a2f90d5)
System information
Godot v4.2.dev (a2f90d5) - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 12:54:31 +0000 - Tty - GLES3 (Compatibility) - AMD Radeon R9 380 Series (tonga, LLVM 16.0.6, DRM 3.54, 6.5.4-zen2-1-zen) () - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
Issue description
Input actions get stuck in the pressed state even after releasing the action's key.
This happens only on web exports. I can reproduce the issue reliably on the latest Chrome/Chromium 117. It does not seem to happen on Firefox.
Steps to reproduce
It happens while pressing/releasing keys. One way I've found to reliably reproduce this issue is the following:
Assume we have 3 actions (A, B, C) with their respective keys assigned. Press and hold A, B and C, one after the other. I.e. press and hold A, then add B, then C. Now you're holding down three keys. Now, release the three keys in the same order they were pressed. I.e. release A, then release B, then release C. When you release key C, observe how is_key_pressed() for C returns false, but is_action_pressed() for C still returns true.
I've created a small test project with a basic character controller that moves with the built-in actions ui_{left,right,up,down}. The controller moves by reading the action pressed status with Input.get_vector(). Debug text shows the status of is_key_pressed and is_action_pressed.
To reproduce with this project, you can use any three of these direction keys to trigger the bug. E.g. press and hold left, down, right. Then release left, down, right. Observe how the character keeps moving right, and the action for right still shows as pressed (while the key doesn't).
vokoscreenNG-2023-10-03_16-37-59.mp4
Minimal reproduction project
Metadata
Metadata
Type
Projects
Status
No status