System keyboard — MRTK3
A Unity application can invoke the system keyboard at any time. The system keyboard will behave according to the target platform's capabilities. For example, the keyboard on HoloLens 2 would support direct hand interactions. Additionally, the system keyboard won't show up when performing Holographic Remoting from the editor to a HoloLens.
How to invoke the system keyboard
[SerializeField]
private TouchScreenKeyboard keyboard;
...
public void OpenSystemKeyboard()
{
keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false, false);
}
How to read the input
[SerializeField]
private TouchScreenKeyboard keyboard;
...
private void Update()
{
if (keyboard != null)
{
keyboardText = keyboard.text;
// Do stuff with keyboardText
}
}
Meta Quest specific setup
If you're targeting Meta Quest, you'll need to make a modification to AndroidManifest.xml
for the keyboard to show up for Quest. Please refer to the documentation for Unity's XRI Examples repo for details.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for