# On Key Press

## Overview

![The On Key Press Node.](/files/1R0GplLJX4V6FdfKnliM)

**On Key Press** is an **Event Listener** **Node** used for executing a **Logic Branch** when a key is pressed on a computer keyboard.

[**Scope**](/incari-studio/2023.1/toolbox/overview.md#scopes): **Scene**, **Prefab**.

## Attributes

![The On Key Press Node Attributes.](/files/MSkzZkR9ShAAcZ3j2aOy)

### Miscellaneous

| Attribute        | Type     | Description                                                                                           |
| ---------------- | -------- | ----------------------------------------------------------------------------------------------------- |
| `Repeat Enabled` | **Bool** | Whether or not the **Event** is triggered while the key is held down, or just when initially clicked. |

### Event

| Attribute | Type          | Description                             |
| --------- | ------------- | --------------------------------------- |
| `Key`     | **Drop-down** | The key that **Incari** will listen to. |

## Outputs

| Output             | Type      | Description                                                                                                                                                                                                                                                                        |
| ------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | Moves onto the next part of the **Logic** once the assigned key is pressed (or held).                                                                                                                                                                                              |
| `Is Alt`           | **Bool**  | Whether or not the **Alt** key was also pressed in combination with the assigned key.                                                                                                                                                                                              |
| `Is Ctrl`          | **Bool**  | Whether or not the **Ctrl** key was also pressed in combination with the assigned key.                                                                                                                                                                                             |
| `Is Shift`         | **Bool**  | Whether or not the **Shift** key was also pressed in combination with the assigned key.                                                                                                                                                                                            |
| `Is Repeated`      | **Bool**  | Indicates whether this is a repeated/subsequent execution of the **Event** (`true`) or the initial time it is executed (`false`). If the `Repeat Enabled` **Attribute** is enabled, the output will always be `false` because the **Event** is only executed on the initial press. |

## See Also

* [**Events**](/incari-studio/2023.1/toolbox/events.md)
* [**Keyboard**](/incari-studio/2023.1/toolbox/events/keyboard.md)
* [**On Key Release**](/incari-studio/2023.1/toolbox/events/keyboard/on-key-release.md)


---

# 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://docs.incari.com/incari-studio/2023.1/toolbox/events/keyboard/on-key-press.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.
