Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

How to display a virtual keyboard when a user clicks on InputField?

We have a canvas and a InputField inside it. Is there any way to display a virtual keyboard below it when a user tries to enter some data in it?

Tagged:

Answers

  • Options

    If you're using Unity and building as a D3D app, you can use the mixed reality toolkit keyboard prefab:

    https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/master/Assets/HoloToolkit/UX/Prefabs

    You can trigger click events on the button objects using the executeevents class:

    using UnityEngine.UI;
    using UnityEngine.EventSystems;

    PointerEventData pointer = new PointerEventData(EventSystem.current);
    pointer.position = new Vector2(Screen.width / 2, Screen.height); // simulate pointer at screen center
    ExecuteEvents.Execute(buttonObjectOnKeyboard, pointer, ExecuteEvents.submitHandler);

    ...or you may be able to just call the .Select() method on the button.

    Alternatively, if you build as a XAML app, the keyboard should just work ...or so I've heard (haven't actually tried).

Sign In or Register to comment.