---
name: "SDL_StartTextInputWithProperties"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_StartTextInputWithProperties"
---

# SDL\_StartTextInputWithProperties(3)

Start accepting Unicode text input events in a window, with properties describing the input.

## NAME

SDL\_StartTextInputWithProperties - Start accepting Unicode text input events in a window, with properties describing the input.

## HEADER FILE

Defined in SDL3/SDL\_keyboard.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_StartTextInputWithProperties(SDL\_Window \*window, SDL\_PropertiesID props);**

## DESCRIPTION

This function will enable text input ( **SDL\_EVENT\_TEXT\_INPUT**\
  and

**SDL\_EVENT\_TEXT\_EDITING**\
  events) in the specified window. Please use this function paired with

**SDL\_StopTextInput** ().

Text input events are not received by default.

On some platforms using this function shows the screen keyboard and/or activates an IME, which can prevent some key press events from being passed through.

These are the supported properties:

•  **SDL\_PROP\_TEXTINPUT\_TYPE\_NUMBER**

• an

**SDL\_TextInputType**\
  value that describes text being\
   input, defaults to  **SDL\_TEXTINPUT\_TYPE\_TEXT** .

•  **SDL\_PROP\_TEXTINPUT\_CAPITALIZATION\_NUMBER**

• an  **SDL\_Capitalization**\
  value that describes how\
   text should be capitalized, defaults to

**SDL\_CAPITALIZE\_SENTENCES**\
  for normal text\
   entry,  **SDL\_CAPITALIZE\_WORDS**\
  for

**SDL\_TEXTINPUT\_TYPE\_TEXT\_NAME** , and

**SDL\_CAPITALIZE\_NONE**\
  for e-mail addresses,\
   usernames, and passwords.

•  **SDL\_PROP\_TEXTINPUT\_AUTOCORRECT\_BOOLEAN**

• true to enable auto completion and auto correction, defaults to true.

•  **SDL\_PROP\_TEXTINPUT\_MULTILINE\_BOOLEAN**

• true if multiple lines of text are allowed. This defaults to true if

**SDL\_HINT\_RETURN\_KEY\_HIDES\_IME**\
  is "0" or\
   is not set, and defaults to false if

**SDL\_HINT\_RETURN\_KEY\_HIDES\_IME**\
  is "1".

On Android you can directly specify the input type:

•  **SDL\_PROP\_TEXTINPUT\_ANDROID\_INPUTTYPE\_NUMBER**

• the text input type to use, overriding other properties. This is\
   documented at\
   https://developer.android.com/reference/android/text/InputType

## FUNCTION PARAMETERS

- *window*

  the window to enable text input.

- *props*

  the properties to use.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetTextInputArea**(3)](/SDL_SetTextInputArea/3.md), **•**(3), [**SDL\_StartTextInput**(3)](/SDL_StartTextInput/3.md), **•**(3), [**SDL\_StopTextInput**(3)](/SDL_StopTextInput/3.md), **•**(3), [**SDL\_TextInputActive**(3)](/SDL_TextInputActive/3.md)
