GamePadConfig - How to remap input for various controllers


I’m teaching my game design course this summer with MonoGame and for the life of me I’m having quite a time getting controller remapping to work properly, particularly on a Mac. An input device such as the PS4 controller has most of the mappings correct (some issues with the shoulder buttons) but the 360 controller is completely wrong (ABXY mapped to the DPad for example).

I’ve read the rather tongue-in-cheek tutorial about using GamePadConfig:

I’ve also in the past rebuilt GamePad.cs per the instructions here:

I’d love to see some example code on how to utilize GamePadConfig, or anything else for remapping the input correctly, without having to do a rebuild of GamePad.cs, so that I can utilize multiple controller types.

Any pointers would be most appreciated!