[Solved] Key mapping widget


I’m making a widget to be able to change the shortcut keys of my game and I have several problems:

I made a function for the remapping (screen 1&2) so I’m sure it’s exactly the same and I made one to set the default key (screen3).

So the first problem: I don’t know how to set the default key for an axis mapping. I’ve done some things quite similar to the key(screen4) action function but without the function to set the default key, it doesn’t seem to remember the new key.

Second problem: If I remap the keys with mouse keys, it doesn’t keep them in memory and keeps only the last saved keyboard key.

Third problem, if I set all mapping actions “Change camera” is set to the same as “aim” no matter what key.

I sincerely hope you can help me, it’s very disabling.

Axis mapping : I made a second axis input for the movement. So now, I have “move forward” + “move backward” instead of “move forward” with 2 scale. (same for left/right)

I used “is keyboard key” because I have 2 input settings; one for the keyboard, one for the gamepad. But, mouse input is not keyboard key so I have to remove it to be able to use mouse input.

For the duplicate key on change camera and aim, I don’t know how but now it’s working.