MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

`OnCommitText` does not fire in `MixedRealityKeyboardBase`

Open talothman opened this issue 4 years ago • 1 comments

Describe the bug

OnCommitText event never fires when return button is pressed on native HL2 keyboard.

To reproduce

Steps to reproduce the behavior:

  1. Open MixedRealityKeyboardExample
  2. Generate new script.
  3. Write some log or provide some functionality and bind that function to MixedRealityKeyboard.OnCommitText.
  4. Deploy to device.
  5. Bring up keyboard by pressing on the input field in the scene.
  6. Press return on the keyboard.
  7. Function that was bound never gets called.

Expected behavior

Function that was bound should get called.

Your setup (please complete the following information)

  • Unity Version [e.g. 2020.3.29f1]
  • MRTK Version [e.g. v2.7.3]

Target platform (please complete the following information)

  • HoloLens 2

Workaround

Simple workaround would be this:

private void Update()
{
    if (UnityEngine.Input.GetKeyDown(KeyCode.Return))
    {
        ...
    }
}

which works but so should OnCommitText .

talothman avatar Apr 20 '22 19:04 talothman

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!

IssueSyncBot avatar Jan 13 '24 00:01 IssueSyncBot