> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_doorlock/keychain.md).

# Keychain

When using ox\_inventory, the doorlock offers a “keychain” option. This allows you to insert keys and door cards into the item.

{% hint style="danger" %}
**Compatibility** The "keychain" function only works with `ox_inventory`, since it offers a container system per item. Keychain can not be opened when using an inventory other than `ox_inventory`.
{% endhint %}

## Setup

After uploading the items according to the tutorial in *Configurations* section, go to `ox_inventory/modules/items/containers.lua` and insert the following code at the end of the file:

```lua
setContainerProperties('rd_keychain', {
    slots = 10,
    maxWeight = 1000.0,
    whitelist = { 'door_key', 'door_card' }
})
```

You can edit the code for maximum weight or number of slots.

{% hint style="danger" %}
It is important that we still have `return containers` at the end of the file!
{% endhint %}

In the final version, the end of the file should look like this:\
![](/files/KvOJLs1AOj0M6Rp5M97C)
