addKeybind
Library
Updated 2 months ago ·
v1.3.7i
Client Module - FiveM only
lib.addKeybind
Register a keybinding that players can rebind via FiveM's settings.
Options
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Unique keybind identifier |
description | string | yes | Label shown in FiveM keybind settings |
defaultMapper | string | no | Input mapper (default "keyboard") |
defaultKey | string | yes | Default key binding |
secondaryMapper | string | no | Secondary input mapper |
secondaryKey | string | no | Secondary default key |
disabled | boolean | no | Start disabled |
onPressed | function(self) | no | Called on key down |
onReleased | function(self, duration) | no | Called on key up, with hold duration in ms |
Keybind Methods
Was this page helpful?
This page was last updated on 12 March 2026