> For the complete documentation index, see [llms.txt](https://docs.neuralaim.ru/napi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neuralaim.ru/napi/dokumentaciya-or-api/keyboard.md).

# Keyboard

### press

```python
def press(key: str) -> None:
```

<table><thead><tr><th width="133">Название</th><th width="60">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>key</td><td>str</td><td>клавиша для нажатия</td></tr></tbody></table>

### release

```python
def release(key: str) -> None:
```

<table><thead><tr><th width="133">Название</th><th width="62">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>key</td><td>str</td><td>клавиша для нажатия</td></tr></tbody></table>

### is\_pressed

```python
def is_pressed(key: str) -> bool:
```

<table><thead><tr><th width="133">Название</th><th width="64">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>key</td><td>str</td><td>Нажата ли эта клавиша</td></tr></tbody></table>

### bind

```python
def bind(key: str, on_press: Callable, on_release: Callable, on_press_data: dict = {}, on_release_data: dict = {}) -> None:
```

<table><thead><tr><th width="188">Название</th><th width="93">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>key</td><td>str</td><td>клавиша для нажатия</td></tr><tr><td>on_press</td><td>Callable</td><td>Функция для вызова на нажатие клавиши</td></tr><tr><td>on_release</td><td>Callable</td><td>Функция для вызова на отжатие клавиши</td></tr><tr><td>on_press_data</td><td>dict</td><td>Словарь(аргумент) передающийся в функцию на нажатие</td></tr><tr><td>on_release_data</td><td>dict</td><td>Словарь(аргумент) передающийся в функцию на отжатие</td></tr></tbody></table>

### wait\_key

```python
def wait_key(self, hotkey: str = "F", suppress: bool = False, on_release: bool = False) -> None:
```

<table><thead><tr><th width="133">Название</th><th width="74">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>hotkey</td><td>str</td><td>клавиша для нажатия</td></tr><tr><td>suppress</td><td>bool</td><td>Подавлять ли ввод клавиатуры</td></tr><tr><td>on_release</td><td>bool</td><td>Срабатывать при отпускании клавиши</td></tr></tbody></table>

### read\_key

```python
def read_key(self, suppress: bool = False) -> str:
```

<table><thead><tr><th width="133">Название</th><th width="77">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>suppress</td><td>bool</td><td>подавлять ли нажатие клавиши</td></tr></tbody></table>

### press\_and\_release

```python
def press_and_release(self, key: str, duration: float = 0.1) -> None:
```

<table><thead><tr><th width="133">Название</th><th width="78">Тип</th><th>Описание</th></tr></thead><tbody><tr><td>key</td><td>str</td><td>клавиша для нажатия</td></tr><tr><td>duration</td><td>float</td><td>Время которое пройдёт после зажатия клавиши до его отжатия</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.neuralaim.ru/napi/dokumentaciya-or-api/keyboard.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.
