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

# Binds

> Manage key binds for cheat settings.

## Functions

| Function | Returns | Description |
| - | - | - |
| `binds.list()` | `table` | All active binds |
| `binds.add(field, key [, mode, value])` | `bool` | Add a bind |
| `binds.remove(field [, number])` | | Remove a bind |
| `binds.active(field [, number])` | `bool` | Whether a bind is currently engaged |

### Bind modes

| Mode | Description |
| - | - |
| `"hold"` | Active while key is held |
| `"toggle"` | Toggle on press |
| `"always"` | Always active |

## Example

```lua theme={null} theme={null}
-- bind ragebot toggle to mouse4
binds.add('ragebot.enable', 0x05, 'toggle')

events.on('paint', function()
    if binds.active('ragebot.enable') then
        render.text(10, 10, color(0, 255, 0), 'RAGE ON', 's')
    end
end)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.