Keyboard input does not change variables correctly

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Problem Description

    Keyboard input does not change variables if you are typing in a textbox. When inputting numbers, a value detecting integers should increase. It does so when you are not typing in a textbox, but does not do so when the user is typing in a textbox. I would expect that the system should still detect keyboard input to update the variable regardless of what Objects are also dependent on keyboard input.

    Attach a Capx

    https://www.dropbox.com/s/t4bvyxuxhjdth ... .capx?dl=0

    Description of Capx

    A text object is set to display the value of a variable that detects the number of times a user presses a number key on the keyboard. A tetbox is available to demonstrate that this value does not update as expects when typing numbers into its field.

    Steps to Reproduce Bug

      Step one: Press any number. Step two: Click in the text box Step three: Type more numbers Step four: Repeat steps pressing "backspace" which should reduce the variable value. This also does not work with the textbox object but works otherwise.

    Observed Result

    The variable does not update when using numbers or backspace in the textbox, but does when you aren't typing in the textbox field.

    Expected Result

    No matter what objects are looking for input, all actions and objects should be able to detect keyboard inputs and update the variables accordingly.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (UNK)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10 Pro

    Construct 2 Version ID

    255 x64

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is not a bug.

    Textbox is a form control and it "intercepts" all input, as far I know you can only detect when Esc and Enter keys are pressed.

    You can make your own version of the TextBox using Text or SpriteText object, here is a tutorial:

    https://www.scirra.com/tutorials/739/your-own-textbox

  • Thank you for helping me to understand that functionality dop2000 and for finding that tutorial for me. I'll have to get moving on this custom textbox .

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