[4.6] How to tell if an Input Field is being used

[4.6] I need to make an if statement inside my script that handles Key presses that asks if an Input Field is being used or not.

I need this so that if an Input Field is being used, the game won’t do certain things if I press a key that does something. Like if I type the key that’s used to open the inventory, it will open the inventory, and I don’t want that to happen.

Is it possible?

How about checking EventSystem.current.currentSelectGameObject to determine what is selected? You can use GetComponent to determine if this is an InputField.