SDL_TextEditingEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_WindowID | windowID
const char * | text
Sint32 | start
Sint32 | length

## Detailed Description

Keyboard text editing event structure (event.edit.*)

The start cursor is the position, in UTF-8 characters, where new typing will be inserted into the editing text. The length is the number of UTF-8 characters that will be replaced by new typing.

Since
  This struct is available since SDL 3.2.0.

Definition at line 384 of file SDL_events.h.

## Field Documentation

## length

Sint32 SDL_TextEditingEvent::length

The length of selected editing text, or -1 if not set

Definition at line 392 of file SDL_events.h.

## reserved

Uint32 SDL_TextEditingEvent::reserved

Definition at line 387 of file SDL_events.h.

## start

Sint32 SDL_TextEditingEvent::start

The start cursor of selected editing text, or -1 if not set

Definition at line 391 of file SDL_events.h.

## text

const char* SDL_TextEditingEvent::text

The editing text

Definition at line 390 of file SDL_events.h.

## timestamp

Uint64 SDL_TextEditingEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 388 of file SDL_events.h.

## type

SDL_EventType SDL_TextEditingEvent::type

SDL_EVENT_TEXT_EDITING

Definition at line 386 of file SDL_events.h.

## windowID

SDL_WindowID SDL_TextEditingEvent::windowID

The window with keyboard focus, if any

Definition at line 389 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h