There is an API / Framework (preferably free), for setting and joystick control with current controls (PC,PS4, Xbox, Nintendo Switch). The majority I found is discontinued or does not contemplate all platforms. Thanks
The Unity input major sucks hard IMHO. Something like rewired (or similar, definitely not free btw) is probably what you need. I am unaware of any free alternatives so would be interested if anyone knows of one.
Only free solution I'm aware of is a very old release of InControl available on Github. I have absolutely no idea what condition it's in though and whether it'll even work with modern releases of Unity. I believe it's made for Unity 4. https://github.com/pbhogan/InControl There are two popular paid solutions on the Asset Store. https://www.assetstore.unity3d.com/en/#!/content/14695 - InControl https://www.assetstore.unity3d.com/en/#!/content/21676 - Rewired InControl is a far less complex beast than Rewired but it relies on Unity's Input API. Rewired completely bypasses it.
Rewired works on all of those platforms (PC like platforms include Windows/MAC/Linux). The largest list of supported controllers out of the box. Racing wheels, Flight controller (Hotas, flight yokes, rudder pedals, helicopter controller, joysticks), ship controller (ship console), train controllers (rail driver) and a large list of game pads. See the full controller list at this URL. http://guavaman.com/projects/rewired/docs/SupportedControllers.html Rewired is well supported on the Unity forums too. See this thread. https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/ Rewired is my recommendation. You can get the trial version and see how it works before spending any money. It is easy to make an informed decision when you have worked with the trial. http://guavaman.com/projects/rewired/trial.html
Rewired will make your life easier, and is especially nice for game controller ("gamepad") support. You get something like 90 gamepads detected automatically out of the box that you only have to map once to a template called "Dual Analog Gamepad." And if players have a truly weird gamepad, it allows you to let them configure those manually too. That would be very rare I think though. You create generic actions ("move", "fire", etc) and map those to generic templates like the Gamepad one and to keyboard and mouse. So you only have to check for that action in your game code and Rewired does the rest. The features go WAY beyond that, but if that's all it did, it would still be worth it.
Glad to hear. If you have any issues, don't forget they have a support line. http://guavaman.com/projects/rewired/#support