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

> 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

:::warning Not available for public chats
Typing indicator is disabled in [public chats](https://www.pubnub.com/docs/chat/unity-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/unity-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/unity-chat-sdk/build/configuration) during initialization.
:::

### Method signature

This method has the following signature:

```csharp
channel.StartTyping()
```

#### Input

This method doesn't take any parameters.

#### Output

An awaitable `Task<ChatOperationResult>`.

### Sample code

Start a typing indicator on the `support` channel.

```csharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PubnubApi;
using PubnubChatApi;
using UnityEngine;
// Configuration
PubnubChatConfig chatConfig = new PubnubChatConfig();
        
PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId"))
{
    SubscribeKey = "demo",
    PublishKey = "demo",
    Secure = true
};

// Initialize Unity Chat
var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration);
if (!chatResult.Error)
{
    chat = chatResult.Result;
}
// reference the channel where you want to listen to typing signals
var channelResult = await chat.GetChannel("support");
if (channelResult.Error)
{
    Debug.Log("Couldn't find channel!");
    return;
}
var channel = channelResult.Result;
// invoke the "startTyping()" method
await channel.StartTyping();
```

## Stop typing

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

You can use this method in cases when you want to disable the typing indicator immediately.

### Method signature

This method has the following signature:

```csharp
channel.StopTyping()
```

### Input

This method doesn't take any parameters.

#### Output

An awaitable `Task<ChatOperationResult>`.

### Sample code

Stop a typing indicator on the `support` channel.

```csharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PubnubApi;
using PubnubChatApi;
using UnityEngine;
// Configuration
PubnubChatConfig chatConfig = new PubnubChatConfig();
        
PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId"))
{
    SubscribeKey = "demo",
    PublishKey = "demo",
    Secure = true
};

// Initialize Unity Chat
var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration);
if (!chatResult.Error)
{
    chat = chatResult.Result;
}
// reference the channel where you want to listen to typing signals
var channelResult = await chat.GetChannel("support");
if (channelResult.Error)
{
    Debug.Log("Couldn't find channel!");
    return;
}
var channel = channelResult.Result;
// invoke the "StopTyping()" method
await channel.StopTyping();
```

## Get typing events

Get up-to-date information about the real-time signals from typing users in the specified channel.

Use the `StreamTyping()` method to enable or disable typing event streaming on a channel, and the `OnUsersTyping` event to handle typing updates. These events let you constantly track who has started or stopped typing and visually represent that in your chat app through a typing indicator.

:::tip Method naming
Earlier versions used `SetListeningForTyping()` to enable streaming. This method has been superseded by `StreamTyping()`, though it remains available for backward compatibility.
:::

### Method signature

These methods take the following parameters:

* StreamTyping() 1channel.StreamTyping(bool stream)
* OnUsersTyping - Event signature 1// event on the Channel entity2public event Action<List<string>> OnUsersTyping;3// needs a corresponding event handler4void EventHandler(List<string> users)

#### Input

| Parameter | Required in StreamTyping() | Required in OnUsersTyping | Description |
| --- | --- | --- | --- |
| stream | bool | Optional |  | Yes | n/a | Whether to start (`true`) or stop (`false`) listening to typing events on the channel. |
| users | List<string> | Optional |  | No | Yes | List of typing user IDs. |

#### Output

These methods don't return a value. Typing updates are delivered through the `OnUsersTyping` event handler.

### Sample code

Get typing events on the `support` channel.

```csharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PubnubApi;
using PubnubChatApi;
using UnityEngine;
// Configuration
PubnubChatConfig chatConfig = new PubnubChatConfig();
        
PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId"))
{
    SubscribeKey = "demo",
    PublishKey = "demo",
    Secure = true
};

// Initialize Unity Chat
var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration);
if (!chatResult.Error)
{
    chat = chatResult.Result;
}
// reference the channel where you want to listen to typing signals
var channelResult = await chat.GetChannel("support");
if (!channelResult.Error)
{
    var channel = channelResult.Result;
    Debug.Log($"Found channel with name {channel.Name}");

    // join the channel, start listening for typing
    await channel.JoinChannel();
    channel.Connect();
    channel.StreamTyping(true);

    // subscribe to the OnUsersTyping event
    channel.OnUsersTyping += OnUsersTypingHandler;
            
    await Task.Delay(4000);

    // indicate that typing has started
    await channel.StartTyping();
}
else
{
    Debug.Log("Channel not found");
}
        
// event handler for typing events
void OnUsersTypingHandler(List<string> users)
{
    if (users.Count > 0)
    {
        Debug.Log($"Users typing: {string.Join(", ", users)}");
    }
    else
    {
        Debug.Log("No users are currently typing");
    }
}
```