Web exported control/shift/alt keys are reported as KEY_C/KEY_S/KEY_A
Godot version
v4.0.stable.official [92bee43ad]
System information
Linux (Debian 11.6), Firefox 102.8.0esr (64-bit) and Chromium 110.0.5481.177
Issue description
In 4.0 web exports, the call Input.is_physical_key_pressed(key) returns true for key value KEY_A when Alt is pressed, for KEY_S when Shift is pressed, and for KEY_C when Control is pressed. I assume it is somehow due to the first character of the full key name matching.
This only affects Input.is_physical_key_pressed on web exports in 4.0. I've confirmed that Input.is_key_pressed works as expected in web exports, that both functions work as expected when launching a game from the editor, and that web exports in 3.5.1 work as expected. So it is only the combination of 4.0 + web export + Input.is_physical_key_pressed that is misbehaving.
I tested using both Firefox and Chromium under Linux.
Steps to reproduce
- Download and import the attached project.
- Export it for the web.
- Open the exported game in your browser.
- Press Alt, Shift, and Control, and see that the game reports that
KEY_A,KEY_S, andKEY_Care being pressed.