Choose the input mapper before the parameter
A RegisterKeyMapping binding combines a command, description, mapper and mapper-specific parameter. A key name is not a numeric GTA control ID. Use the matching parameter reference for the selected device and test the default binding in the intended FiveM client.
Start with the complete key-binding resource, then use the input mapper catalog to choose a mapper. The official parameter directory warns that some mapper descriptions are inferred; listing an identifier does not certify its behavior on every controller or runtime.
Keyboard and mouse
- KEYBOARD: keyboard parameter names.
- MOUSE_BUTTON and MOUSE_WHEEL: button and wheel parameters.
- MOUSE_RELATIVEAXIS: relative mouse-axis entries and their documented limits.
Gamepad and joystick
- PAD_DIGITALBUTTON and PAD_DIGITALBUTTONANY.
- JOYSTICK_BUTTON and JOYSTICK_POV.
- JOYSTICK_AXIS and PAD_AXIS: inspect limitations before relying on axis mappings.
Verify a usable binding
Register the command once, provide a clear description and verify that pressing and releasing the chosen input has the intended result. Rebind it through the player’s FiveM key settings and repeat the test. Confirm that resource restart does not leave duplicate handlers. A default can conflict with GTA or a framework; changing the default does not justify overwriting a player’s saved preference.
Use numeric controls for APIs such as IsControlPressed; use these mapper/parameter strings for key mappings. Keep the two identifier systems separate in code examples and bug reports.