I did this way:
One global variable for each configurable key;
Limit a text box to input only the set of keys configured before;
Only one key per text box;
Use the valor of the text box as the key of your keyboard inputs;
But I think it can be done by many ways and my way is not the best one. Later I'm thinking in learn more about arrays and try to use an array to limit the configurable keys.
If you still having trouble, I'll clear the code in a new sample file and share with you, because this is now intrinsic to very complex codes in my game.