Textboxes Eat Keyboard Input

Bugs will be moved here once resolved.

Post » Sun Apr 24, 2016 11:21 pm

Problem Description
Keyboard On Key Pressed events don't register keystrokes if a textbox currently has focus. This is true for most keys--RETURN and a few others are exceptions.

Steps to Reproduce Bug
  • Add a text box to your layout
  • Create an On Key Pressed event to do something obvious, like end the application.
  • Run your app and observe that the key detection works.
  • Run your app again, give the textbox focus, and observe that the key detection no longer works.

Observed Result
If a textbox has focus, the On Key Pressed event doesn't register.

Expected Result
The On Key Pressed event should register, regardless of what element currently has focus. I'm making a chat where pressing the up arrow key will recall the previous message sent. With this bug, this behavior is impossible.

Affected Browsers
  • Chrome: YES
  • FireFox: Untested
  • Internet Explorer: Untested

Operating System and Service Pack
Windows 7 64 bit

Construct 2 Version ID
Release 206
B
4
Posts: 5
Reputation: 210

Post » Mon Apr 25, 2016 3:31 am

Please note that I am unable to attach a capx, as per the forum rules. Perhaps it's a permissions issue with my account. In any case, this bug should be easily reproduced.
B
4
Posts: 5
Reputation: 210

Post » Wed May 04, 2016 12:29 pm

This is by design, to prevent text input conflicting with game input. Please also only test the latest release of C2 (206 is old now) and see the bug report guidelines which describe how to attach a .capx. Closing.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Tue Dec 20, 2016 3:52 pm

Is there any way to easily bypass that though? I remember doing it before by hacking into the actual exported C2 javascript files T__T but you have to do that every time you export a new version.

I guess making a plugin would work too ...

Anything easier though?
B
5
S
1
Posts: 15
Reputation: 755


Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests