We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    Show / Hide Table of Contents

    System keyboard

    System keyboard

    A Unity application can invoke the system keyboard at any time. Note that the system keyboard will behave according to the target platform's capabilities, for example the keyboard on HoloLens 2 would support direct hand interactions, while the keyboard on HoloLens (1st gen) would support GGV (Gaze, Gesture, and Voice)1. Additionally, the system keyboard will not show up when performing Unity Remoting from the editor to a HoloLens.

    How to invoke the system keyboard

    public TouchScreenKeyboard keyboard;
    
    ...
    
    public void OpenSystemKeyboard()
    {
        keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false, false);
    }
    

    How to read the input

    public TouchScreenKeyboard keyboard;
    
    ...
    
    private void Update()
    {
        if (keyboard != null)
        {
            keyboardText = keyboard.text;
            // Do stuff with keyboardText
        }
    }
    

    System keyboard example

    You can see a simple example of how to bring up system keyboard in MixedRealityKeyboard.cs (Assets/MRTK/SDK/Experimental/Features/UX/MixedRealityKeyboard.cs)

    See Also

    • Mixed Reality Keyboard Helper Classes
    • Improve this Doc
    In This Article
    Back to top Generated by DocFX