its would been something like that, but of course with only the input a game would need.
Also that string based system did caused the code to been vastly shorted with fewer lines, since only the init and a function take care most of it really.
Also im will also see how im can save the code for a controller, so people a least could tweak it, even there is no remapping feature in a Windows game.
Today im implemented keyboard keys as well. On Android, its would been keyboard only of course as this would been easier its should, that way im impleneted using KEY(), while its why a outout is from 0-128 rather than 0-1.
But all in all, its totally impossible to support every gampad, but 99% of times, remapping should do the job. That is the main goal here. This time the utility should do this for you as well. even for each player.
btw, for standard, its of course ps4, switch and xbox. the main layout would been after ps4, not xbox. The main thing here, its depend how the trigger is used (on Ps4, 3 axis returns -1 on 3 axis, while a xbox does do that).