For keyboard you want to look at keycodes. Create variables or an array where you store the keycodes for each button your game uses.
e.g
Var_JumpKey = 32 (32 is the spacebar keycode)
If by default you have made the space bar "jump" in your game, instead of using an "ON Spacebar Pressed" event, you use an "on Keycode Pressed" and for the keycode value, reference the Var_JumpKey variable where you stored the keycode.
If you want to change the jump key to shift, you create a system where the Var_JumpKey is updated to the keycode of the shift key (16) when it is pressed.
At a basic level, something like this:
On Any Key Pressed - Set Var_JumpKey to Keyboard.LastKeyCode
The process for gamepads is basically the same except you use button indexes instead of keycodes.