> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typing Indicators

> Show real-time typing indicators when users are composing messages.

Typing indicators let you show a "user is typing..." animation in your chat UI. The CometChat Unreal SDK provides two separate delegates — `OnTypingStarted` and `OnTypingEnded` — plus methods to send typing state from the local user.

***

## Send Typing Indicators

Use `StartTyping` and `EndTyping` on the Subsystem to notify other users that the local user is composing a message.

> [tab] Blueprint
>
> 1. Get a reference to the **CometChat Subsystem**
> 2. Create an `FCometChatTypingIndicator` struct with the receiver info
> 3. Call **Start Typing** when the user begins typing
> 4. Call **End Typing** when the user stops (or after a timeout)

> [tab] C++
>
> ```cpp theme={null}
> void AMyActor::NotifyTypingStarted(const FString& ReceiverId, const FString& ReceiverType)
> {
>     UCometChatSubsystem* Chat = GetGameInstance()->GetSubsystem<UCometChatSubsystem>();
>
>     FCometChatTypingIndicator Indicator;
>     Indicator.ReceiverId = ReceiverId;
>     Indicator.ReceiverType = ReceiverType; // "user" or "group"
>
>     Chat->StartTyping(Indicator);
> }
>
> void AMyActor::NotifyTypingEnded(const FString& ReceiverId, const FString& ReceiverType)
> {
>     UCometChatSubsystem* Chat = GetGameInstance()->GetSubsystem<UCometChatSubsystem>();
>
>     FCometChatTypingIndicator Indicator;
>     Indicator.ReceiverId = ReceiverId;
>     Indicator.ReceiverType = ReceiverType;
>
>     Chat->EndTyping(Indicator);
> }
> ```

> [!TIP]
>
> **Auto-end pattern**: Start a 5-second timer when the user begins typing. Reset it on each keystroke. When the timer fires without a reset, call `EndTyping`. This prevents stale typing indicators if the user walks away mid-message.

***

## Listen for Typing Events

Bind to `OnTypingStarted` and `OnTypingEnded` delegates on the Subsystem to receive typing notifications from other users.

> [tab] Blueprint
>
> 1. Get a reference to the **CometChat Subsystem**
> 2. Drag off and search for **On Typing Started** / **On Typing Ended**
> 3. Use **Bind Event** to connect each to a custom event
> 4. The custom event receives an `FCometChatTypingIndicator` parameter

> [tab] C++
>
> ```cpp theme={null}
> void AMyActor::BeginPlay()
> {
>     Super::BeginPlay();
>
>     UCometChatSubsystem* Chat = GetGameInstance()->GetSubsystem<UCometChatSubsystem>();
>     Chat->OnTypingStarted.AddDynamic(this, &AMyActor::HandleTypingStarted);
>     Chat->OnTypingEnded.AddDynamic(this, &AMyActor::HandleTypingEnded);
> }
>
> void AMyActor::HandleTypingStarted(const FCometChatTypingIndicator& Indicator)
> {
>     // Show typing indicator for this user in the conversation
>     ShowTypingBubble(Indicator.Sender.Uid, Indicator.ReceiverId);
> }
>
> void AMyActor::HandleTypingEnded(const FCometChatTypingIndicator& Indicator)
> {
>     // Hide typing indicator
>     HideTypingBubble(Indicator.Sender.Uid, Indicator.ReceiverId);
> }
> ```

***

## FCometChatTypingIndicator

| Property | Type | Description |
| - | - | - |
| `ReceiverId` | `FString` | The user UID or group GUID where typing is happening |
| `ReceiverType` | `FString` | `"user"` for 1:1 or `"group"` for group conversations |
| `Metadata` | `FString` | Optional metadata JSON string |
| `Sender` | `FCometChatUser` | The user who started or stopped typing |

> [!TIP]
>
> **UI pattern**: When `OnTypingStarted` fires, show a typing animation (e.g., three bouncing dots). When `OnTypingEnded` fires, hide it. Consider adding a local timeout (e.g., 5 seconds) to auto-hide the indicator in case the end event is missed due to network issues.

***

## Event Flow

```mermaid theme={null}
sequenceDiagram
    participant A as User A (Sender)
    participant S as CometChat Cloud
    participant B as User B (Receiver)

    A->>S: StartTyping(Indicator)
    S->>B: OnTypingStarted fires
    Note over B: Show "User A is typing..."
    A->>S: EndTyping(Indicator)
    S->>B: OnTypingEnded fires
    Note over B: Hide typing indicator

    style A fill:#333,stroke:#666,color:#fff
    style S fill:#555,stroke:#999,color:#ccc
    style B fill:#333,stroke:#666,color:#fff
```

***

## Next Steps

> [card] [Delivery & Read Receipts](https://www.cometchat.com/docs/sdk/unreal/delivery-read-receipts.md)
>
> Track when messages are delivered and read.

> [card] [Real-Time Events](https://www.cometchat.com/docs/sdk/unreal/real-time-events.md)
>
> See all 40+ real-time delegates available.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.