Head to Options > Input Plugin Configuration and the rest is fairly self-explanatory. Click the field beside each button, then press whatever key or controller input you want bound to it.
If the mapping refuses to stick, close that window, open Settings and switch to a different input plugin, then try again. That resolves most stubborn controller issues.