Disabling input from other blueprint(s)

Hello everyone,

I have a little problem with a school project of mine. My graduation depends on it : (

In my game, player can activate white and black boxes by pressing Q and E button. When player presses a button, block appears, when key is released it disappears.

I would like to create a blueprint in which when player presses and holds Q button, E button can’t be interacted with and vice versa. I have tried to do something in terms of Q button (image below) but it didn’t work well.

Simply put: when white boxes are active, state of black boxes cannot be changed in any way.

Thank you in advance.