How to disable certain key(for example E key) press and enable it when necessary?

Hi ,

I believe you are talking about disabling certain keys in the editor and not in a game you are making, correct?

To do this go to Edit > Editor Preferences > General > Keyboard Shortcuts and hit the red X beside of the function of the key you want disabled. As long as you don’t hit Set as Default, you can always Reset to Defaults later on.

Thanks, TJ

Thanks for the reply!
However,in my case,i just want to disable the key in game for certain purposes.
For example,if the player is in an area,so he can press the key to trigger something,but if he is not in that area,i dont want the key press to take effect ,thus i want to disable it until the player goes into the are.

In that case you will probably need to use Blueprints to do it for you. Probably a combination of a box volume and Blueprints to disable or enable certain controls while the player is inside.

Please take a look at the forum links below for ideas on how to implement this:

I hope that helps

Sorry i did not make that clear.

thanks a lot I’ll try that out!

Hi, glad it worked out for you! Could you possibly post a picture of the blueprint?