How to add controller button/joystick presses to custom input axises?

My older brother is making a game, and he wants to add controller compatibility, like I said in my question about adding controller inputs to custom axises. Someone answered, but didn’t show how to add controller button/joystick presses to custom input axises.

@ExplodingCreeperMakesGames Here is an answer that explains how an Xbox controller maps to the standard input system: Xbox one controller mapping [SOLVED] - Questions & Answers - Unity Discussions He may need another solution if he is using the new input system or a custom one from an asset.

The same axes should map to PlayStation and Switch controllers, although you’d have to be careful about the face button mapping (i.e. the A button on Xbox is different to the A button on Switch).