> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elementlabs.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Controls

> Set the key that opens the map and tune how the mouse drives the camera.

## Purpose

`configs/controls.jsonc` owns the command that opens the map, the key it is bound to by default, and
how the camera responds to the mouse.

Which controls a player uses is fixed and not configurable: dragging is always the left mouse
button, zooming is always the wheel, and setting a destination is always the right button or a
double click. What you change here is how those inputs feel. The full list is in [How players use
the map](/products/map/using-the-map).

## Options

| Key                 | Default        | Meaning                                                                                                                                                                                                                                                             |
| ------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`           | `"map_toggle"` | The internal name of the key binding. The map registers it as the command `+<command>` and binds the key to it. Renaming it after players have bound the key resets their bindings.                                                                                 |
| `defaultKey`        | `"ESCAPE"`     | The key bound for a player who has not chosen their own.                                                                                                                                                                                                            |
| `dragSensitivity`   | `1.0`          | How far the camera moves for a given mouse movement. `2.0` moves twice as far.                                                                                                                                                                                      |
| `scrollSensitivity` | `100.0`        | How much altitude one scroll step changes.                                                                                                                                                                                                                          |
| `friction`          | `0.6`          | How quickly movement decays after the input stops. Lower settles sooner; higher glides longer.                                                                                                                                                                      |
| `maxScrollSpeed`    | `5000.0`       | The ceiling on how fast altitude can change, whatever the scroll input.                                                                                                                                                                                             |
| `doubleClickMs`     | `300`          | The longest gap, in milliseconds, between two clicks that still counts as a double click.                                                                                                                                                                           |
| `detailKey`         | `56`           | The control that toggles high/low blip detail on the map. `56` is the gamepad's right-stick click, the same button the original pause map uses; it is a control index, not a key name, so a keyboard player who wants it should set it to a keyboard control index. |

The label players see for the binding in the FiveM key-mapping menu is the `controls.description`
text in the [language files](/products/map/configuration/locales). The shipped English label is
`Toggle 3D Map`.

Both sensitivities are relative to altitude, not to the world: the same drag covers more ground when
the camera is higher. That is what keeps the map usable at every zoom level, and it means the
defaults do not need adjusting for a particular part of the map.

### Choosing a key

`defaultKey` accepts the key names FiveM uses, such as `M`, `F5`, `TAB` or `ESCAPE`. It applies only
to players who have not set their own binding; a player who has rebound the key keeps their choice,
and changing this value does not move it.

`ESCAPE` is chosen so the map takes the place of the pause map. If your server binds `ESCAPE`
elsewhere, pick another key here.

## Example

```jsonc theme={null}
{
  "namespace": "controls",
  "configVersion": 1,
  "scope": "client",
  "values": {
    // ESCAPE is taken by our own menu.
    "defaultKey": "M",
    "dragSensitivity": 1.4,
    "friction": 0.45
  }
}
```

Everything not listed keeps its shipped value.

## Applying changes

```text theme={null}
restart element_map
```

Players who already rebound the key are unaffected by a change to `defaultKey`. Players who have
not are moved to the new key at their next connection.

## Safety

| Key                 | Stay within                                  | Why                                                                                                                                                                     |
| ------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `friction`          | Above `0`, below `1`                         | At `1` or above, movement never settles and the camera drifts after every drag. At `0` it stops the instant the button is released, which feels abrupt but is usable.   |
| `dragSensitivity`   | Roughly `0.5` to `2.0`                       | Far above that, a small hand movement crosses the map and precise positioning becomes impossible.                                                                       |
| `scrollSensitivity` | Roughly `50` to `300`                        | Far above that, one scroll step crosses most of the altitude range.                                                                                                     |
| `maxScrollSpeed`    | Leave as shipped unless zooming feels capped | Lowering it makes zooming feel heavy; raising it lets a fast scroll overshoot.                                                                                          |
| `doubleClickMs`     | Roughly `200` to `500`                       | Below that, double clicks are hard to perform. Above it, a click on a marker takes noticeably long to act, because the map waits to see whether a second click follows. |

`command` is safe to change, but changing it after players have rebound the key resets their
bindings: FiveM keeps a binding against the command name, and a renamed command is a new one.

## Related

* [Configuration](/products/map/configuration/index)
* [Camera](/products/map/configuration/camera)
* [How players use the map](/products/map/using-the-map)
