---
source_url: https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/typing-indicator
title: Typing indicator
updated_at: 2026-06-04T11:09:52.560Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Typing indicator

Typing indicators show users when someone is composing a message. This feature:

* **Increases engagement** - Users see activity in group chats
* **Sets expectations** - Users know when to expect a response in 1:1 conversations

##### Usage in Blueprints and C++

You can use PubNub's functionality via Blueprints or directly in C++ code.

* In Blueprints, you can access PubNub from any Widget or Actor. Start by [initializing chat](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#initialize-pubnub-chat) using `InitChat` on `UPubnubChatSubsystem`. Afterwards, you can use the returned `UPubnubChat` object reference to call all Chat SDK functions.

:::warning Blueprint functions
The Blueprints provided in the documentation show how you can structure your application and may contain utility methods and elements like buttons that are not part of the Unreal Chat SDK and are meant to serve as guidance.
:::

* In C++, you can use UPubnubChatSubsystem as any other Game Instance Subsystem. #include "Kismet/GameplayStatics.h" #include "Engine/GameInstance.h" #include "PubnubChatSubsystem.h" // ACTION REQUIRED: Replace ASample_ChatSubsystem with name of your Actor class void ASample_ChatSubsystem::InitChatSample() { // Get PubnubChatSubsystem from GameInstance UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(this); UPubnubChatSubsystem* PubnubChatSubsystem = GameInstance->GetSubsystem<UPubnubChatSubsystem>(); // Initialize Chat - InitChat may fail under some conditions so make sure to check the Result for errors before using the Chat FPubnubChatInitChatResult InitChatResult = PubnubChatSubsystem->InitChat(TEXT("demo"), TEXT("demo"), TEXT("Player_001")); UPubnubChat* PubnubChat = InitChatResult.Chat; } Chat now allows you to call all Chat SDK functions, for example, Chat->GetChannel("my_channel").

:::note Asynchronous and synchronous method execution
Most PubNub Unreal SDK methods are available in both asynchronous and synchronous variants.
* Asynchronous methods (Async suffix) return void and take an optional delegate parameter that fires when the operation completes. 1Channel->StartTypingAsync(OnStartTypingResponseDelegate); You can also use native callbacks that accept lambdas instead of dynamic delegates. Native callback types have the Native suffix (for example, FOnPubnubChatOperationResponseNative).
* Synchronous methods (no suffix) block the main game thread until the operation completes and return a result struct directly. 1FPubnubChatOperationResult Result = Channel->StartTyping();
:::

:::warning Not available for public chats
Typing indicator is disabled in [public chats](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create#create-public-channel). If you try implementing this feature in a public channel type, you'll get the `Typing indicators are not supported in Public chats` error.
:::

## Start typing

`StartTyping()` activates the typing indicator on a channel.

The method uses a debounce mechanism: signals are sent at intervals rather than on every keystroke. The [default timeout](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#input-parameters) is 5000 ms (5 seconds), with a 1000 ms buffer to prevent rapid re-triggering.

:::tip Custom timeout
Set a custom timeout with the [typingTimeout parameter](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#input-parameters) during initialization.
:::

### Method signature

#### C++ / Input parameters

```cpp
Channel->StartTyping();
```

#### Output

| Type | Description |
| --- | --- |
| `FPubnubChatOperationResult` | Result of the operation. Check `Error` for failure. |

### Sample code

:::tip Reference code
This example is a self-contained code snippet ready to be run. Set up your Unreal project and follow the instructions in the lines marked with `ACTION REQUIRED` before running the code. Use it as a reference when working with other examples in this document.
:::

Start a typing indicator on the `incident-management` channel.

###### Actor.h

```cpp
UFUNCTION(BlueprintCallable, Category = "PubnubChat|Samples|ChatChannel")
void StartTypingSample();
```

###### Actor.cpp

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StartTypingSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Emit a typing-start event for the current user on this channel
	Channel->StartTypingAsync(nullptr);
}
```

## Stop typing

`StopTyping()` deactivates the typing indicator on a channel.

Use this method to disable the typing indicator immediately (for example, when a user deletes a draft message) without waiting for the [typingTimeout](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/typing-indicator#start-typing) to end.

### Method signature

#### C++ / Input parameters

```cpp
Channel->StopTyping();
```

#### Output

| Type | Description |
| --- | --- |
| `FPubnubChatOperationResult` | Result of the operation. Check `Error` for failure. |

### Sample code

:::tip Reference code
This example is a self-contained code snippet ready to be run. Set up your Unreal project and follow the instructions in the lines marked with `ACTION REQUIRED` before running the code. Use it as a reference when working with other examples in this document.
:::

Stop a typing indicator on the `incident-management` channel.

###### Actor.h

```cpp
UFUNCTION(BlueprintCallable, Category = "PubnubChat|Samples|ChatChannel")
void StopTypingSample();
```

###### Actor.cpp

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StopTypingSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Emit a typing-stop event for the current user on this channel
	Channel->StopTypingAsync(nullptr);
}
```

## Stream typing events

`StreamTyping()` adds a [signal events listener](https://www.pubnub.com/docs/sdks/javascript/api-reference/configuration#event-listeners) underneath to get all [events of type typing](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/custom-events#events-for-typing-indicator). Run it once on a given channel to start listening to typing signals. Users bind the `OnTypingChanged` multicast delegate before calling `StreamTyping()`. To stop receiving typing events, call `StopStreamingTyping()`.

### Method signature

```cpp
Channel->StreamTyping();
```

Bind the channel's `OnTypingChanged` delegate before calling `StreamTyping()` to receive typing events.

#### Output

| Type | Description |
| --- | --- |
| `FPubnubChatOperationResult` | Result of the operation. Check `Error` for failure. |

### Sample code

Get a list of user IDs currently typing on the `support` channel.

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StreamTypingSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Bind to receive typing indicator events (user IDs currently typing)
	Channel->OnTypingChangedNative.AddUObject(this, &ASample_ChatChannel::OnTypingReceived);

	// Start streaming typing events (not supported on public channels; use for group or direct)
	Channel->StreamTypingAsync(nullptr);

	// When typing indicators are no longer needed, stop streaming
	Channel->StopStreamingTypingAsync(nullptr);
}

// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::OnTypingReceived(const TArray<FString>& TypingUserIDs)
{
	/* e.g. show typing indicators in chat UI for TypingUserIDs */
}
```

### Other examples

Stop receiving typing signals on the `support` channel.

###### Actor.h

```cpp
UFUNCTION(BlueprintCallable, Category = "PubnubChat|Samples|ChatChannel")
void StreamTypingSample();

void OnTypingReceived(const TArray<FString>& TypingUserIDs);
```

###### Actor.cpp

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StreamTypingSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Bind to receive typing indicator events (user IDs currently typing)
	Channel->OnTypingChangedNative.AddUObject(this, &ASample_ChatChannel::OnTypingReceived);

	// Start streaming typing events (not supported on public channels; use for group or direct)
	Channel->StreamTypingAsync(nullptr);

	// When typing indicators are no longer needed, stop streaming
	Channel->StopStreamingTypingAsync(nullptr);
}

// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::OnTypingReceived(const TArray<FString>& TypingUserIDs)
{
	/* e.g. show typing indicators in chat UI for TypingUserIDs */
}
```