Skip to content

Conversation

@arielj
Copy link
Collaborator

@arielj arielj commented Aug 17, 2024

This PR updates the virtual keyboard to solve a few issues and makes it compatible with all text inputs.

Before this, the virtual keyboard when using a gamepad was only valid for the search box in the library and it was partially compatible with the search box in the winetricks dialog (it would open, but behind the dialog, so it was unusable).

This PR has a few changes:

  • Use showModal for dialogs instead of the popover API, that fixes the issue with the keyboard appearing behind the winetricks dialog (closes Built-in virtual keyboard is behind the winetricks modal #3197 )
  • Fix an issue where the x button of the search inputs was not working with the controller (instead of clicking the SVG icon, we now click the parent button)
  • Updates the gamepad handling to open the keyboard for any text input and to send events to it, not only search inputs
  • Updates the TextInputField to support the input events sent by the keyboard module (we can't use react's onChange flow)
  • Because of the previous item, now the onChange function passed to TextInputField receives the new value and not a react on change event, so I had to updated all the places that used that to replace the e.target.value with newValue

There are 2 issues I can't find how to fix (both errors are present in the main branch already though, so leaving the out of the scope of this):

  • when navigating the elements inside a modal, when we reach the top/bottom, if we continue moving the stick it will actually scroll the library for example, I can't find any way to prevent this (seems to be some issue with the spatial navigation feature we use)
  • when displaying search results below the input (either the list of games in the library or the list of winetricks packages found), the elements are not focusable. This is also some issue with the spatial navigation that can't seem to move the focus to elements inside a container with a predefined height or max-height

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Aug 17, 2024
@arielj arielj requested review from a team, CommandMC, Etaash-mathamsetty, Nocccer, flavioislima and imLinguin and removed request for a team August 17, 2024 03:52
</head>
<body>
<div id="root"></div>
<div class="simple-keyboard"></div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was not used, we have another div for this inside the react app

@arielj arielj force-pushed the fixes/virtual-keyboard-inputs branch from af304be to e34949b Compare December 14, 2024 03:02
@arielj arielj requested a review from CommandMC December 14, 2024 03:03
@arielj arielj force-pushed the fixes/virtual-keyboard-inputs branch from e34949b to 33cd4f0 Compare June 4, 2025 03:45
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Lgtm

@arielj arielj force-pushed the fixes/virtual-keyboard-inputs branch from 33cd4f0 to 0408e68 Compare July 14, 2025 22:12
@arielj arielj merged commit 244caa4 into main Jul 14, 2025
9 checks passed
@arielj arielj deleted the fixes/virtual-keyboard-inputs branch July 14, 2025 22:18
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jul 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr:ready-for-review Feature-complete, ready for the grind! :P

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in virtual keyboard is behind the winetricks modal

4 participants