Getting EVERY button input

I’m looking to handle all inputs that the user makes via a class rather than having jumbled up code with lots of If’s. Is there any way to get every button input that has happened, if it is button down or button up. I set out a void to handle this, which I was planning on sending two parameters to - Button name and button state (Up or down).

I checked in the documentation but got a bit lost, could somebody possibly point me in the right direction or give me a sample?

Thanks!

If you can live without button up, you could use Input.inputString in combination with Input.anyKeyDown.