Search Unity

Question Maintaining App Focus after TouchScreenKeyboard Status Changes to 'Done' in Unity (Android, Quest2)

Discussion in 'UGUI & TextMesh Pro' started by rahulchawla2801, May 27, 2023.

  1. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34
    I'm encountering a visibility issue with the TouchScreenKeyboard while working on my Android device, Meta Quest 2. Here's the problem I'm facing:
    • The keyboard opens correctly, and both the 'active' and 'visible' fields are set to true.
    • When I press "enter" on the keyboard, the TouchScreenKeyboard's status changes to "done", and both the 'active' and 'visible' fields become false.
    • However, even though the status is "done," the keyboard remains in focus, and I have to click outside of the keyboard to bring focus back to the app.
    I would like to know how I can automatically bring back focus to the app once the TouchScreenKeyboard's status changes to "done." Is there a way to programmatically refocus the app after the keyboard is dismissed?

    Any insights or solutions to this issue would be greatly appreciated. Thank you in advance!