RegisterKeyMapping does not allow controller rebinding

  1. Client build: production; FXServer version: 4410
  2. What you expected to happen: When you have a key bound it should allow you to remap to other controller buttons or at least the same key.
  3. What actually happens: If you have a controller button mapped and you accidentally change it to a keyboard key, you are unable to change it back to a controller button.
  4. Category of bug: client/native
  5. Reproducible steps, preferably with example script(s):

Steps to reproduce

  1. Add a command to a controller button
  2. Change that button to a keyboard key
  3. You are now unable to change it to a controller button/change it back to the same button as before.

Test script to easily reproduce.

RegisterKeyMapping('testcommand', 'Test controller', 'PAD_DIGITALBUTTON', 'RRIGHT_INDEX')

RegisterCommand('testcommand', function()
	print('works')
end)

I would like to apologize if this was already reported/is known, I was unable to personally find anything on the topic.

This doesn’t really seem like a bug, the game itself also doesn’t allow you to bind any keys to a controller input by hand.

Ah alright, thank you. I just thought since you can make RegisterKeyMapping a controller button and unbinding it causes it not to be a controller key. So I thought it might have been something with RegisterKeyMapping. I apologize for this.

As a workaround you can rebind it using rbind in console w/ the right resource name and command, but this indeed is a little unfriendly.

Thanks to the FiveM team, this has been resolved with