If you want to show the native Android or iOS keyboard, please enable WebViewPrefab.NativeOnScreenKeyboardEnabled. If you instead want to show 3D WebView's Keyboard prefab or a custom keyboard when an input field in the webview is clicked, you can use the IWebView.FocusedInputFieldChanged event to detect when a text input is focused and then hide or show the keyboard in response to that. Here's an example:
using UnityEngine;
using Vuplex.WebView;
class Example : MonoBehaviour {
// Set these fields via the Editor.
// https://support.vuplex.com/articles/how-to-reference-a-webview
public WebViewPrefab webViewPrefab;
public Keyboard keyboard;
async void Start() {
// Hide the keyboard after it initializes so that it's initially hidden.
await keyboard.WaitUntilInitialized();
keyboard.gameObject.SetActive(false);
// Use the FocusedInputFieldChanged event to hide or show the Keyboard based on whether an input field is focused.
await webViewPrefab.WaitUntilInitialized();
webViewPrefab.WebView.FocusedInputFieldChanged += (sender, eventArgs) => {
var shouldShowKeyboard = eventArgs.Type != FocusedInputFieldType.None;
keyboard.gameObject.SetActive(shouldShowKeyboard);
};
}
}