LogoLogo
  • Codesign Documentation
  • Information
    • Discord Roles
    • FiveM Asset Escrow System
    • Authentication & Transfers
  • Coding Information
    • Register Key Mapping
    • Code Snippets
    • Self Debugging
  • Paid scripts
    • Arm Wrestling
      • Configs, Locales & SQL
    • Car HUD
      • Configs, Locales & SQL
    • CCTV Cameras
      • Configs, Locales & SQL
    • Darts
      • Configs, Locales & SQL
    • Dispatch
      • Configs, Locales & SQL
      • Resource Integration
    • Door Lock
      • Configs, Locales & SQL
    • Garage
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs, Locales & SQL
      • Resource Integration
    • Gun Range
      • Configs, Locales & SQL
    • Identity
      • Configs, Locales & SQL
    • Multicharacter
      • Configs, Locales & SQL
    • Player HUD
      • Configs, Locales & SQL
    • Props
      • Configs, Locales & SQL
    • Radar
      • Configs, Locales & SQL
    • Spawn Select
      • Configs, Locales & SQL
    • Terminal Hacker
      • Configs, Locales & SQL
    • Vehicle Control
      • Configs, Locales & SQL
    • VIP Shop
      • Configs, Locales & SQL
  • Free Scripts
    • Easytime
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs & Locales
    • Drawtext UI
    • Devtools
    • Keymaster - Minigame
    • Staff Support
    • Notifications
Powered by GitBook
LogoLogo

Codesign Software © All rights reserved

On this page
  • Info
  • How to Unbind Keys
  • How to Disable KeyMapping
  • Notes

Was this helpful?

  1. Coding Information

Register Key Mapping

PreviousAuthentication & TransfersNextCode Snippets

Last updated 2 years ago

Was this helpful?

Translate

If you want to change the default key bind for all players, you MUST change it in the configs/config.lua BEFORE starting the resource on your main server.

Info

We have started using the FiveM native called RegisterKeyMapping . 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. Open Gta5 settings > Key Bindings > FiveM.

How to Unbind Keys

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 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.

How to Disable KeyMapping

  • Firstly unbind the keys using the method above, disable the key in the config.lua and then you can rewrite the code to use the regular method of while loops checking for key presses IsControlJustReleased or other methods to trigger the events we provide to you in our docs.

Notes

  • There is no way to mass unbind keys for all of your server's players.

The full list of available keys can be found .

Click here to translate this page.
How do I change language?
FiveM Documentation
Example
input_parameter
here