Skip to main content

XGameUiTextEntryOpen

Opens up a virtual keyboard where the title is responsible for rendering the text. Currently unimplemented on desktop.

Syntax

Parameters

options   _In_
Type: XGameUiTextEntryOptions
Indicates the initial set of options to apply to the keyboard when it is opened such as placement and the keyboard configuration. maxLength   _In_
Type: uint32_t
Maximum number of characters that the user can enter in the virtual keyboard. This number must not be greater than 32K. initialText   _In__opt_z_
Type: const char*
Null-terminated character string that is initially populated in the virtual keyboard. initialCursorIndex   _In_
Type: uint32_t
Initial byte index of the cursor relative to the starting character. handle   _Out_
Type: XGameUiTextEntryHandle
Handle to the newly opened virtual keyboard.

Return value

Type: HRESULT HRESULT success or error code. For a list of error codes, see Error Codes.

Remarks

This function will return as soon as it can get the handle, even if the virtual keyboard is not yet visible. All other XGameUiTextEntry functions are safe to call as soon as the handle is returned. The following example demonstrates the basics of how to use the XGameUiTextEntry functions.

Requirements

Header: XGameUI.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XGameUI
Virtual keyboard support
Last modified on August 20, 2026