Thank you for the answer. This method is working for one widget, but not another. There are two issues.
The first is that when the pause menu widget is brought up, the game inputs do not clear. So, for example, if the player is walking forwards and presses the pause menu key, the character continues to walk forwards while the pause menu is up. This does not happen when bringing up the inventory widget.
Here is the blueprint for the player character, where the widgets are brought up:
Secondly, the On Key Down override doesn’t seem to be working for the pause menu widget. I added print strings to each of the overrides to try and debug.
This is my blueprint for the inventory menu On Key Down:
And this is my blueprint for the pause menu On Key Down:
When the inventory widget is open, and the Tab key is pressed, the menu closes and the ‘Hello’ string is printed. But when P is pressed on the pause menu, nothing happens, and no ‘Hello’ string is printed. I’d like to note that I am not actually pausing the game yet, just trying to get the UI to open/close with key presses.