Keyboard input does not change variables correctly

Bugs will be moved here once resolved.

Post » Sat Mar 17, 2018 1:46 am

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
B
80
S
48
G
30
Posts: 420
Reputation: 22,515

Post » Sat Mar 17, 2018 2:05 pm

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
B
17
S
9
G
156
Posts: 2,203
Reputation: 82,987

Post » Sat Mar 17, 2018 9:01 pm

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 :).
B
80
S
48
G
30
Posts: 420
Reputation: 22,515


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests