When the player comes into the menu, you have to store the current action key in a variable.
Then when they click the input selector, you have to see if it has changed. If it has, you then clear the current action mapping and put the new one in.
I have it in two macros like this:
Inside, they are:


