Register Key Mapping

Please read through RegisterKeyMapping usage to understand how to organize your keybinds correctly. Do not skip any text in the entire section.

What is a RegisterKeyMapping and why do we use it?

We have started using the FiveM native called RegisterKeyMapping FiveM Documentation. This removes the need for while loops checking every frame for keypresses, therefore allowing the resource to be more optimised. This FiveM native works by triggering the chat command it has been registered with when the keybind is pressed.

This new method also allows each client to change their own key binds in-game. Example Open Gta5 settings > Key Bindings > FiveM.

How do I unbind my current keybinds?

Once you have started the resource on your server for the first time, even if you change the key in the config.lua, it will not change for the players who have already joined. Although it will change for the players who join after you have changed it.

Option 1:

  • To unbind keys for your client only you can type unbind keyboard input_parameter in F8.

Option 2:

  • Go to C:\Users[USERNAME]\AppData\Roaming\CitizenFX

  • Open fivem.cfg

  • Remove the lines with this resource name.

  • Restart Fivem. Keybinds will be set back to default values set in the config.

Last updated