Skip to content

Keyboard on the Hololens 2 not working #10025

@Daniel4144

Description

@Daniel4144

Describe the bug

The MixedRealityKeyboard is not showing up on the Hololens 2. I added a MixedRealityKeyboard to the scene and called ShowKeyboard("text").
The first call of ShowKeyboard throws an exception:
ArgumentOutOfRangeException: Selection is out of range. Parameter name: selection at UnityEngine.TouchScreenKeyboard.set_selection (UnityEngine.RangeInt value) [0x00000] in <00000000000000000000000000000000>:0 at Microsoft.MixedReality.Toolkit.Experimental.UI.MixedRealityKeyboardBase.ShowKeyboard (System.String text, System.Boolean multiLine) [0x00000] in <00000000000000000000000000000000>:0

To reproduce

Steps to reproduce the behavior:

  1. Add a MixedRealityKeyboard component to the scene
  2. call ShowKeyboard
  3. See error, keyboard is not visible

Your setup

  • Unity Version 2021.1.10f1
  • MRTK Version 2.7.0, 2.7.2

Target platform

  • HoloLens 2 with OpenXR

Additional context

I also tried TouchScreenKeyboard Open("text"), which also did not work and throws no exception.

I have read, that the system keyboard on the Hololens is only working, if build type is set to XAML, but XAML builds are not working at all (no error, but nothing is visible on the Hololens). Because that thread is quite old and the build type is not mentioned in the documentation I am not sure, if that is still true.

Is a specific platform capability needed for the keyboard?

Metadata

Metadata

Assignees

Labels

ExternalThis is an issue with, or behavior of a component / tool external to MRTKInput - Keyboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions