Best practice for keyboard inputs?

I want to allow pressing “g or i” to open up my inventory. Of course, I can add a Input.KeyDown(“i”) in the Update() field for my MonoBehaviour script, but is there a better way to do this? if not, where should I put my script?

@highpockets is absolutely correct. To give you something else to look into, I highly recommend checking the new input system out - Introducing the new Input System | Unity Blog