> For the complete documentation index, see [llms.txt](https://lt-studios.gitbook.io/lt-studios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lt-studios.gitbook.io/lt-studios/player-controls-guide/user-guide/how-to-change-the-keys.md).

# How to change the keys

All keybindings and control labels in **LT-Controls** are defined in a single, centralized config file:\
`config.lua` → `config.keys`

This object maps key names (e.g. `F10`, `TAB`, `Z`) to metadata such as label text, order, and visibility conditions. You can customize everything from the keybind itself to who sees it.

#### Sample Structure:

```lua
config = {
  keys = {
    ['F10'] = {
      order = 1,
      label = "Toggle Controls",
    },
    ['F1'] = {
      order = 2,
      label = "Radial Menu",
    },
    ...
  }
}
```

#### How to Add or Change a Key

Each key entry supports the following fields:

* `label` → the on-screen description players see.
* `order` → determines vertical positioning (lower = higher).
* `toShow` *(optional)* → a function that returns true/false depending on the player's job, state, etc.

#### Example: Add a New Keybind

Let’s say you want to show `G` as “Open Garage”:

```lua
['G'] = {
  order = 13,
  label = "Open Garage",
}
```

Example: Restrict a Key to Police & EMS Only

```lua
['O'] = {
  order = 12,
  label = "Open Dispatch",
  toShow = function(playerData)
    return playerData and playerData.job and
      (playerData.job.name == 'police' or playerData.job.name == 'ambulance')
  end,
}
```

#### Quick Customization Steps

1. **Change a key label**\
   Update the `label` field of any entry.\
   \&#xNAN;*Example*: `"Toggle Phone"` → `"Open Smartphone"`
2. **Reorder controls**\
   Lower `order` values show higher on screen.
3. **Remove a key**\
   Just delete that key entry from the table.
4. **Add a new key**\
   Follow the format above, and pick a unique `order`.
5. **Restrict by job/player state**\
   Use a custom `toShow(playerData)` function.

Once saved, your changes take effect immediately when you refresh the NUI or restart the resource.
