You need to use key codes
I'm not sure what the key codes for each button is, but you can set the text or textbox to show the pressed button's key code. I have done this before.
Textbox: Set text to Keyboard.LastKeyCode
The string expression of key code is Keyboard.StringFromKeyCode(Key code number value)
As for key mapping, you need to save the key codes into variables (global vars). Set the default values to default control buttons, then change the values of variables if the player changes the controls.
Oh, I was only talking about keyboard, not sure how key mapping works in touch.