Closed hermann-noll closed 9 months ago
We were having the same issue and were able to find a workaround, so here it is in case anyone else experiences this :)
Note: I unfortunately do not have the time to submit a PR and I'm not even sure if this "fix" is the desired behaviour of MRTK with the ProcessPaused flag...
We have our own wrapper MonoBehaviour which we use for our input field logic, so the following code is from that wrapper class.
private void Start()
{
...
_inputModule = CameraCache.Main.GetComponent<MixedRealityInputModule>();
_inputField.onSelect.AddListener(PauseInputModuleProcess);
_inputField.onDeselect.AddListener(UnpauseInputModuleProcess);
...
}
private void PauseInputModuleProcess(string _)
{
_inputModule.ProcessPaused = true;
}
private void UnpauseInputModuleProcess(string _)
{
_inputModule.ProcessPaused = false;
}
...
public override void Process()
{
using (ProcessPerfMarker.Auto())
{
// Do not process when we are waiting for initialization
if (ManualInitializationRequired || ProcessPaused)
{
base.Process(); // <--- This line
return;
}
...
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Describe the problem
When
TMP_InputField
is used with the system keyboard air taps will cause the Hololens keyboard to close. This happens very easily, especially for unexperienced Hololens users.Describe the solution you'd like
I would like an option to disable air taps closing the keyboard when using
TMP_InputField
.Describe alternatives you've considered
There is a
DisableUIInteractionWhenTyping
property which unfortunately does not seem to do anything in regards toTMP_InputField
. Alternatively I have tried setting theProcessPaused
property whenever the keyboard is visible (TouchScreenKeyboard.visible
), but this also disables closing via the enter button.