> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-inventory/keys-and-commands.md).

# Keys and commands

Every key and chat command of CAS Advanced Inventory for RedM on one page, for players and admins.

Keys marked with a config name can be changed in `config/config.lua` (`Config.Keys`, RedM control hashes).

## The satchel

| Key                 | Action                                                                            |
| ------------------- | --------------------------------------------------------------------------------- |
| **I** (`Keys.Open`) | Open the satchel. Pressed again, it closes it                                     |
| **TAB** / **ESC**   | Close                                                                             |
| **F1**              | Settings: the look, interface size, sounds, walking, hotbar mode, panel positions |
| Drag                | Move a stack. Between two inventories a card asks how many                        |
| **SHIFT** + drag    | Move the whole stack                                                              |
| **CTRL** + drag     | Move one                                                                          |
| **ALT** + drag      | Move half                                                                         |
| Right click         | The item menu                                                                     |

With the mouse over an item:

| Key            | Action                            |
| -------------- | --------------------------------- |
| **E**          | Use, equip, or open a bag         |
| **G**          | Give                              |
| **T**          | Take or store (with a stash open) |
| **S**          | Split                             |
| **X**          | Drop                              |
| **L**          | Lock or unlock the stack          |
| **1** to **5** | Put it on the hotbar              |

## Hotbar

| Key                              | Action                |
| -------------------------------- | --------------------- |
| Hold **ALT** (`Keys.HotbarHold`) | Show the hotbar       |
| **ALT** + **1** to **5**         | Use or draw that slot |

With `Config.HotbarHoldOnly = false` the number keys work without ALT.

## Ground, carrying, gifts

| Key                                | Action                                                |
| ---------------------------------- | ----------------------------------------------------- |
| **G** (`Keys.PickUp`)              | Next to a drop: open the satchel with the ground card |
| **ENTER** (`Keys.PlaceConfirm`)    | Put a placed drop down                                |
| **LEFT** / **RIGHT** / mouse wheel | Turn a placed drop                                    |
| **BACKSPACE** (`Keys.PlaceCancel`) | Cancel placing                                        |
| **G** (`Keys.CarryDrop`)           | Put down what you carry in your arms                  |
| **H** (`Keys.CarryHorse`)          | Load what you carry onto your horse                   |
| **ENTER** / **BACKSPACE**          | Accept or decline a gift                              |

## Car trunks (CAS Motor Cars)

| Key                               | Action                                                  |
| --------------------------------- | ------------------------------------------------------- |
| Hold **G** at the back of the car | Open the trunk (the car's own key)                      |
| **I** at the open trunk           | Look inside: the satchel opens with the trunk beside it |
| Hold **G** at the open trunk      | Close the lid                                           |

## The weapon screen

Right click a gun, **INSPECT**.

| Key                                    | Action                       |
| -------------------------------------- | ---------------------------- |
| **V**                                  | Toggle the camera view       |
| **Z**                                  | Zoom (sidearms)              |
| **E**                                  | Aim                          |
| **R**                                  | Clean (one gun oil)          |
| **SPACE**                              | Flip the gun (long guns)     |
| **H**                                  | Hide or show the panels      |
| **U**                                  | Unload into the gunbelt      |
| **F**                                  | Put the gun away             |
| **ESC**                                | Close the weapon screen      |
| Drag the 3D gun / wheel / double click | Turn / zoom / reset          |
| Drag a part item onto the gun          | Fit it                       |
| Right click a fitted part              | Take it off into the satchel |

## Chat commands

| Command        | What it does                              | Config                   |
| -------------- | ----------------------------------------- | ------------------------ |
| `/trade [id]`  | Trade with that rider, or the closest one | `Config.Commands.Trade`  |
| `/search [id]` | Search that rider, or the closest one     | `Config.Commands.Search` |
| `/craft`       | Open hand crafting                        | `Config.Commands.Craft`  |

Set a command to `''` to turn it off. Radial menus can use the client events in [For developers](/script-documentation/cas-advanced-inventory/developers.md#starting-things-from-other-scripts).

## Admin

| Command                              | What it does                                        |
| ------------------------------------ | --------------------------------------------------- |
| `/invadmin open <id>`                | Open a player's satchel                             |
| `/invadmin give <id> <item> [count]` | Give an item or a weapon                            |
| `/invadmin clear <id>`               | Empty a player's satchel                            |
| `/invadmin count <id> <item>`        | How many of an item a player has                    |
| `/invadmin reload`                   | Reload item definitions added while the server runs |

Allowed for the ace `cas_inventory.admin` or the groups in `ServerConfig.AdminGroups`. The server console may use every command except `open`.

```
add_ace group.admin cas_inventory.admin allow
```

On RSG the stock `inventory`, `closeinv`, `giveitem` and `clearinv` commands keep working.
