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

# Deploying touch control layouts using Tak CLI

> Deploying your touch control layouts

## Overview

After you've [built your touch layouts](https://docs.xbox.com/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-building-touch-layout.md), you'll want to interact with them in your game.

## Prerequisites

To deploy and view your layouts, you'll need to have:

* A Windows PC that has the [Touch Adaptation Kit Command Line Tool (tak.exe)](https://docs.xbox.com/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line.md).
* A device with the [Web Content Test Application](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md), [Android Content Test Application (Deprecated)](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-android-content-test-application.md), or the [Windows PC Content Test Application (Deprecated)](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-windows-pc-content-test-application.md).
* A set of layouts that you would like to deploy and view.

## Deploying your layouts

### 1. Serve the layouts

On the Windows PC that has the [Touch Adaptation Kit Command Line Tool (tak.exe)](https://docs.xbox.com/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line.md), utilize the [Serve Command](https://docs.xbox.com/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) to make the layouts available to devices that request them.

```pwsh theme={null}
C:\Program Files (x86)\Microsoft GDK\bin>tak serve --layout-path C:\MyGameLayouts
Verifying touch adaptation bundle 'C:\MyGameLayouts '.
Now listening on: http://0.0.0.0:9269
Application started. Press Ctrl+C to shut down.
Hosting environment: Production
Content root path: C:\MyGameLayouts
```

### 2. Configuring the Content Test Application to load

In the settings of your Content Test Application, enter the configuration for the Touch Adaptation Settings (in the Developer section).

* Make sure **Enable sideload** is toggled on.
* Enter the address to the PC (including port) that's serving the layouts.

> [!NOTE]
>
> If you're using the [Web Content Test Application](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md) with **Safari** or to connect to a **remote PC** running the serve command, ensure that the sideload address starts with `https` and that the `--certificate-file` option was used. See [Serve Command](https://docs.xbox.com/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) for more information on starting secure (HTTPS) sideload servers.

* Enable autorefresh if you want changes that are made to the layouts to be immediately updated on all connected clients (otherwise, updates will only happen when a new streaming connection is started).

![Developer Settings](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-developer-settings.png?fit=max\&auto=format\&n=sIrPFR_ir_sNKVEv\&q=85\&s=9256baca111dbef55c2b30943854da88).

### 3. Stream your game

Upon each streaming connection, the CTA will connect to the TAK server and download the latest layouts.

![Layout downloaded](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-layout-download.png?fit=max\&auto=format\&n=sIrPFR_ir_sNKVEv\&q=85\&s=19d0d50c10717892e8456150b0afb598).

When a layout is requested, you'll see a request and download on the PC that's hosting the `serve` command.

```
C:\Program Files (x86)\Microsoft GDK\bin>tak serve --layout-path C:\MyGame\layouts
Verifying touch adaptation bundle 'C:\MyGame\layouts'.
Now listening on: http://0.0.0.0:9269
Application started. Press Ctrl+C to shut down.
Hosting environment: Production
Content root path: C:\MyGame\layouts
Request starting HTTP/1.1 POST http://192.168.1.1:9269/connection/negotiate?negotiateVersion=1  0
Request finished in 1.6283ms 200 application/json
Request starting HTTP/1.1 GET http://192.168.1.1:9269/connection?id=3u0Xs_Dlwn-J1mREHTcG5w
Request starting HTTP/1.1 GET http://192.168.1.1:9269/v1/tabs/active/download
Request finished in 3.9865ms 200 application/octet-stream
```

### 4. Select your layout

After a streaming session has been started, you can select the touch layout to be utilized by selecting Developer and then TAK from the in-stream overlay by selecting the `...` button at the top-left corner.

![Select layout.](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-select-layout.gif?s=17361970f8265532f37be519fab3ad4e)


## Related topics

- [Publishing touch layouts](https://docs.xbox.com/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-publishing-layouts.md)
- [Touch Adaptation Kit (TAK) Reference](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)
- [Touch Adaptation Kit (TAK) Editor for Visual Studio Code](https://docs.xbox.com/build/core-features/common/game-streaming/tak-editor/index.md)
- [Touch Adaptation Kit (TAK) command line tool reference](https://docs.xbox.com/build/core-features/common/game-streaming/tak-command-line-tool/index.md)
- [Getting started with touch](https://docs.xbox.com/build/core-features/common/game-streaming/game-streaming-getting-started-with-touch.md)
