The way to go in the future I guess is CommonUI. It handles all the functionality for e.g. opening a UI (escape/settings menu) without even binding the key to open/close in one of your IMCs (it looks like it also does implicitly what I wrote below). I’m not using it right now, but it is very powerful - esp. for complex UI navigation and multi platform development.
But you can also use the following functions to enable/disable input for your current possessed Pawn:
APawn->InputEnabled() (checks if the input is enabled for this pawn)
APawn->EnableInput(PC)
APawn->DisableInput(PC)
(PC = ref. to PlayerController)