The last version (18.02.09) of Recalbox introduces a way to remap ScummVM buttons.
Check here for more details: https://gitlab.com/recalbox/recalbox/issues/310

But you have to known the SDL button number you want to map.

Don't rely too much on this feature, it is a temporary one. Indeed, ScummVM will introduce a more general improvement for gamepad management in next release.