Get Started
Keyboard Manager
Keyboard Manager is the major component on the keyboard which will process if a certain key has been pressed, and set the characters/action to the target input field.
Text Prediction
All the suggested words are in UIKits/Content/Resources/google-10000-english.txt folder, which is from google-10000-english. The file keeps a list of most common English words in order of frequency. If you want to add more suggested words, you can simply add words into the file. The Suggestions GameObject is located under each Keyboard.
In the Keyboard Suggestions component, you can set the maximum number of suggestions. Please don’t forget to add more Suggestion under Suggestions, if you increase the maximum number of suggestions.
To change each suggestion size, you can simply change the cell size on Suggestions > Grid Layout Group.
If you don’t need text prediction, you can simply remove Suggestions GameObject.
Mobile Keyboard for Oculus Quest
Oculus Quest has trouble using Unity’s built-in input field after the project is built. Because Oculus Quest is based on Android system, it tries to call the default Android Keyboard every time the input field is focused. This is causing weird behaviour in Oculus Quest.
My solution is to write a completely customised input field to get rid of this problem.
For Oculus Quest user, please use the keyboard in the Prefabs/Mobile/Keyboard folder. The mobile keyboard only works with the CustomisedInputField in the Prefabs/Mobile/Inputs folder. Please have a look at the example FormKeyboard-L1 in the Prefabs/Mobile/Keyboard folder or check out the OculusLaserDemo(Quest) example scene.