> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-dispatch/configuration/keybinds.md).

# Keybinds

The default keys, how to change them, and how to leave one unmapped.

### Defaults

| Key           | Action                                           | Config field                      |
| ------------- | ------------------------------------------------ | --------------------------------- |
| `F7`          | Toggle the quick call window                     | `Config.Dispatch.window.key`      |
| `Y`           | Respond to the alert, or to the highlighted call | `keys.accept`                     |
| `N`           | Dismiss the alert, or cancel your response       | `keys.decline`                    |
| `Backspace`   | Code 4 - clear the call you are on               | `keys.code4`                      |
| `Tab`         | Take Primary on your call                        | `keys.takePrimary`                |
| `Up` / `Down` | Move the highlight in the window                 | `keys.focusUp` / `keys.focusDown` |

```lua
    keys = {
        accept = 'Y',
        decline = 'N',
        code4 = 'BACK',
        takePrimary = 'TAB',
        focusUp = 'UP',
        focusDown = 'DOWN',
    },
```

These are FiveM key names - `'Y'`, `'F7'`, `'BACK'`, `'TAB'`, `'UP'`, `'DOWN'`, `'NUMPAD1'` and so on.

{% hint style="info" %}
The prompts drawn on the alert card read their labels from this config, so if you rebind accept to `'H'` the card says **H Accept**. `BACK` is drawn as a backspace glyph and `TAB` as "Tab".
{% endhint %}

### Leaving a key unmapped

Set it to an empty string:

```lua
takePrimary = '',
```

The bind is then never registered, but the underlying command still exists - so players can map it themselves under **Settings > Key Bindings > FiveM** in the pause menu, and other resources can still trigger it.

{% hint style="warning" %}
Defaults here only apply to a player the first time they load the resource. Once FiveM has stored a binding for a command, changing the config does **not** move that player's key - they have to rebind it in the pause menu, or delete the mapping from their local settings.
{% endhint %}

### What the keys are bound to

Each key maps to a plain command, which is what makes them remappable and callable from elsewhere:

| Command                                   | Does                            |
| ----------------------------------------- | ------------------------------- |
| `mango_dispatch_window`                   | Toggle the quick call window    |
| `mango_dispatch_accept`                   | Respond                         |
| `mango_dispatch_decline`                  | Dismiss alert / cancel response |
| `mango_dispatch_code4`                    | Clear your call                 |
| `mango_dispatch_take_primary`             | Take Primary                    |
| `mango_dispatch_focus_up` / `_focus_down` | Move the highlight              |

They are all no-ops for players who are not units, and the context-sensitive ones do nothing when they do not apply - pressing Code 4 when you are not on a call, for example.

### Context, key by key

`Y` behaves differently depending on what is on screen:

* Window **closed**, alert **up** - responds to that call and dismisses the card.
* Window **open** - responds to the highlighted call.
* Already responding - does nothing. You cannot be on two calls at once; responding to a second call moves you off the first.

`N` likewise:

* Responding - cancels your response.
* Otherwise, with an alert up - dismisses the card. The call itself is untouched and stays in the window.

See [Responding and Code 4](/mango5m-docs/resources/mango-dispatch/features/responding-and-code-4.md) for the full flow.
