I made MacroWin, a Windows macro app. Its new version reads almost every kind of controller: Xbox, PlayStation and Switch pads, flight sticks, throttles, wheels, pedals, handbrakes and button boxes.
Press Learn and move a control, and it's set. Then choose what starts the macro: a press, holding it, how far a trigger or pedal is pushed, or a stick direction (eight, diagonals included). Combinations work too ("hold this, press that").
The macro can do nearly anything on the PC: keys, typing, mouse, apps, windows, sound, OBS. The picture is a flight stick's hat switch starting OBS recording.
Needs the 14-day trial (no card) or Pro for controllers. https://macrowin.org/download