protonscr

ISteamUtils.ShowGamepadTextInput interaction with button release causes a bogus G key entry.

steamopen overlayGeneral controller / Steam Input
ValveSoftware/steam-for-linux#9196 · opened 2023-02-12 by geeksville · updated 2023-07-19 · 1 comments · github
Ggeeksville 2023-02-12 github

Your system information

  • Steam client version (build number or date): built on feb 10th, 2023, 2:38 pm
  • Distribution (e.g. Ubuntu): Ubuntu 22.10
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

If a Steam API client calls ISteamUtils.ShowGamepadTextInput() due to some button press by the user of their game. Steam raises the UI for the keyboard but then immediately generates a bogus 'G' key press to the app. Presumably because the app called due to button press, then Steam code starts running, then user releases the button that caused the keyboard to appear. G is the character because that's what the default highlighted key is on the keyboard due to mouse position.

This bug is very annoying because it is quite common to press A to select something in-game, game raises keyboard, and the default name is messed up as 'G'. (because press/release by the user are probably only like 100ms apart)

Recommended fix: If the 'A' (select) button is already pressed when the keyboard gui is raised, do not generate a keypress event for its release. i.e. require a full press and then release sequence to occur after the keyboard GUI is raised.

btw @kisak-valve based on that this bug occurs even if I'm using the proton version of the game (and how the pending A press probably causes the bug) I bet there is high odds this same bug would occur when used under Windows. Keep being awesome btw.

Steps for reproducing this issue:

  1. Launch Valheim under proton (i.e. not even using the native version of their build, but rather the Windows version)
  2. Using the gamepad (in this case a PS5 controller - but I bet that doesn't matter), press A on something in the game which causes Valheim to programmatically raise the on-screen keyboard. Keep button held down (to guarantee you show the bug).
  3. Valheim/Steam raises the on-screen keyboard.
  4. Release the A button (in normal usage, steps 2-4 are probably only 50-100ms apart). The keyboard text entry box in valheim shows 'G' as the string (rather than the expected empty string).
Eericraneprojects 2023-07-19 github

I'm seeing the same issue. ShowGamepadTextInput returns true, but no keyboard comes up.

Nothing extracted yet.