New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental TextmeshPro and UnityUI input field helpers that work with HoloLens keyboard #7577
Experimental TextmeshPro and UnityUI input field helpers that work with HoloLens keyboard #7577
Conversation
…ext; added starting the keyboard with the text of inputfields; added class descriptions
…RealityToolkit-Unity into mrtk_experimental_inputFieldKeyboadHelper
…RealityToolkit-Unity into mrtk_experimental_inputFieldKeyboadHelper
…RealityToolkit-Unity into mrtk_experimental_inputFieldKeyboadHelper
…RealityToolkit-Unity into mrtk_experimental_inputFieldKeyboadHelper # Conflicts: # Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/SystemKeyboardExample.cs # Assets/MixedRealityToolkit.SDK/Experimental/MixedRelityKeyboard/MixedRealityKeyboardBase.cs
…alityToolkit-Unity into mrtk_experimental_inputFieldKeyboadHelper
Assets/MRTK/SDK/Experimental/MixedRealityKeyboard/KeyboardInputFieldBase.cs
Outdated
Show resolved
Hide resolved
Fixed |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
After my latest fix I can't reproduce the issue, seems fixed, or not 100% repro. Since this is experimental, bugs that occur infrequently (< 25% of cases) are acceptable. I noticed in one of four times I brought up keyboard, that I typed "One" and the letters ended up "noo", but was not able to reproduce after several more attempts. |
# Mixed Reality and HoloLens Keyboard helpers | ||
|
||
MRTK provides several experimental helper components to assist with launching and reading text from the [System Keyboard](../../../../../Documentation/README_SystemKeyboard.md). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be helpful to note that the keyboard does not work in editor or while remoting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…and update title and toc entry
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the new changes and it looks good to me.
For the future: @CDiaz-MS noticed that Unity UI will sometimes select all of the text when the text input field is selected. Since this is the default Unity behavior, we decided not to change it. If we want to force Unity UI to always move the caret to the end, solutions are presented here: https://stackoverflow.com/questions/41484725/how-to-disable-selectall-text-of-ui-inputfield-when-it-gets-focus |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
This PR is a continuation of the PR from @Alexees #6036, thank you to alexees for the original fix.
Additional changes on top of @Alexees original PR:
Original PR from @Alexees:
Overview
The class MixedRealityKeyboard is a MonoBehaviour that shows how to Open, Close and use the system native keyboards on UWP platforms.
The programmer still has the responsibility to link it with whatever she/he needs the input for. This means she/he needs to write additional MonoBehaviour scripts to link the with for example InputFields, which activate on click.
I wanted to make this easier in that InputFields and TMP_InputFields are handled directly by just one additional script attached to them.
Fixes: #3970 by providing a workaround -- to get the keyboard to show up, attach the input field helper component to the gameobject containing the input field.
Changes
This set of scripts provides the following:
I first went for overriding the InputFields, but first, they are far too complicated to just do that and second, The existing implementation of MixedRealityKeyboard.cs already completely ignores InputField interactions and second there might be more uses for the keyboard than just InputFields.