# Device Canvas Setup

{% hint style="warning" %}
This only needs to be done if you’re setting the canvas buttons yourself or if anything might be missing
{% endhint %}

### Basic Button Setup

1. Open the UI Manager GameObject

<figure><img src="/files/VvPWUuI0PnxAjwgK7DrR" alt=""><figcaption></figcaption></figure>

2. Select and open out the appropriate **DeviceType - Canvas**

<figure><img src="/files/q4jx6HIpRi7zAgTdAZE0" alt=""><figcaption></figcaption></figure>

3. Select any of the Button numbers, add an **OnClick()** event in the bottom right of the inspector by clicking the **+** (Unless it already has one added)
4. Add your **CodeDeviceUIManager** (UI Manager GameObject) to the available slot

<figure><img src="/files/6hdd60RGoMknTSG7kgBJ" alt=""><figcaption></figcaption></figure>

5. On the drop down on the right (No function dropdown if nothing is selected)&#x20;
   1. Choose the **CodeDeviceUIManager** option which will open out into more
6. Choose **CodeDeviceUIManager.KeyPressString**
7. You can then add whatever number or keyboard symbol you like in the slot below the dropdown
8. Continue this for each button available.

{% hint style="warning" %}
**Similar setup for the CLOSE / CLEAR / Submit Buttons**
{% endhint %}

### **Clear / Close / Submit Buttons Setup**

1. Select any of the input keys, add an **OnClick()** event in the bottom right of the inspector by clicking the **+**
2. Add your **CodeDeviceUIManager** GameObject to the available slot
3. On the drop down on the right, choose the **CodeDeviceUIManager** option which will open out into more

### Close Key

{% hint style="info" %}
Choose: **CodeDeviceUIManager.KeyPressClose**
{% endhint %}

<figure><img src="/files/GgHaCiP1oMqzKbBlgbOq" alt=""><figcaption></figcaption></figure>

### **Clear Key**

{% hint style="info" %}
Choose: **CodeDeviceUIManager.KeyPressClear**
{% endhint %}

<figure><img src="/files/fQ087hWVtbYYhLwh7IZ4" alt=""><figcaption></figcaption></figure>

### **Submit Key**

{% hint style="info" %}
Choose: **CodeDeviceUIManager.KeyPressSubmit**
{% endhint %}

<figure><img src="/files/ReoAfwKmMwywRxrKjaiN" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://speedtutoruk.gitbook.io/keypad-system-doc/getting-started/keypad-canvas-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
