Disable a specific event (InputActionFire) whilst the UI/widget is open?

My menu draws but clicking a checkbox causes the players gun to fire.
If I use DisableInput I’m unable to close the UI/widget as the open/close key is caps lock.

I’ve tried SetCinematicMode and Set Input Mode Only (Game only/ui only/game and ui) but they also disables caps lock.

I’m currently experimenting with branches/flipflops and do once’s but not having much luck.

Ideas are welcome. Thank you.

Easiest way would be to have a boolean that you set to true for the time your UI is open and to false for the time it is closed.
And then you place that boolean in front of your left click event of your Character with a branch to prevent him from
firing.

If you place the UI opening and closing Logic in your PlayerController, and the shooting logic in your PlayerCharacter, you can
disable the PlayerCharacter Input and you should still be able to close the inventory. (then you don’t need the bool).