> For the complete documentation index, see [llms.txt](https://0x29a.gitbook.io/0x29a-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0x29a.gitbook.io/0x29a-docs/introduction/hotkeys.md).

# Hotkeys

The bootstrap exposes `bind`/`unbind` as globals — a thin layer over `input.pressed`, already wired into the frame scheduler.

## `bind(vk, fn)`

Binds a key to a function. `fn` fires **once per press** (edge detection, doesn't repeat while the key is held).

```lua
bind(input.KEY.F5, function()
    print("F5 pressed")
end)
```

## `unbind(vk)`

Removes the bind associated with that key.

```lua
unbind(input.KEY.F5)
```

## Key constants

Use the `input.KEY.*` table instead of magic numbers — it covers letters, digits, F1–F12, navigation keys, modifiers, and mouse buttons. See the full list in [input](/0x29a-docs/runtime/input.md#input-key).

```lua
bind(input.KEY.INSERT, function() end)  -- don't do this: INSERT is already the menu
bind(input.KEY.F6,     toggle_esp)
bind(input.KEY.MOUSE5, function() print("mouse5") end)
```

## Mouse priority while the menu is open

When the main overlay menu is open, 29a claims **full mouse priority** by default: clicks and movement are routed to the UI, not the game, even outside the bounds of a specific ImGui window. This stops the game from "stealing" a click that you aimed at the menu.

If your script builds its own menu with `ui.capture_input(true)` and wants to allow click-through outside its own windows, disable that behavior:

```lua
ui.capture_input(true)     -- request capture for your own menu
ui.mouse_priority(false)   -- only capture while the mouse is actually over one of your windows
```

Called with no arguments, `ui.mouse_priority()` just reads the current value — see [ui.mouse\_priority](/0x29a-docs/interface/ui.md#ui-mouse-priority).


---

# 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, and the optional `goal` query parameter:

```
GET https://0x29a.gitbook.io/0x29a-docs/introduction/hotkeys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
