Key Mapping: Retrieving Current Key Bindings

Hey everyone,

I’ve been working on some scripting for FiveM / RedM, and I’ve been using the RegisterKeyMapping native to set up key bindings in the game’s settings. It’s a great feature, but I’m facing a small challenge.

I can set up key bindings using RegisterKeyMapping, but I can’t seem to find a native function that allows me to retrieve the currently assigned key for a specific action. This would be really useful for providing players with an overview of their control settings or for dynamic UI updates based on key bindings.

So my question is, does anyone know if there is already a native function available to retrieve the currently assigned key for an action in the KeyMapping? If there is, could you point me in the right direction?

If there isn’t such a native function available, I’d like to suggest that this feature be considered for future updates. It would be a valuable addition for server developers and script creators to enhance the user experience.

I appreciate any insights or suggestions on this matter. Thanks for your help!

Best regards

There is a way to get the current keybind. See this following threads to know how to implement this feature:

was based on:

Greetings :handshake: