How do I unfocus a textbox when an arrow key is pressed

0 favourites
  • 5 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi!

    Construct doesn't seem to be capable of regognizing specific key presses when the textbox-window is active. I'm trying to unfocus the textbox when the player wants to move forward by pressing the arrow keys, but it's not working -the textbox still has the focus. I also tried to use the browser object (because it has a blur command) but I was unsuccesfull with that approachh as well. To be clear, I would like the game to get the focus when the player presses one of the arrow keys (instead of the textbox), because when the textbox has the focus the player is stuck and can't move.

    There must be some way to defocus/blur the textbox without having to use the mouse! Any ideas are welcome!

  • If this is not possible, I welcome that information as well!

  • I don't think it's possible without modifying the TextBox plugin. The TextBox plugin blocks all keys except escape and enter.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Okay thank you, it's very helpful to know that at least esc and enter work. I guess I will just have to educate the player with a sign that tells them to hit esc when the texbox opens.

  • Is there a way of having the textbox not steal input?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)