[BUG] Unity UI InputField Not Receiving Text Input
vmohan7 opened this issue ยท 13 comments
Describe the bug
I followed the documentation in order to setup browser input to be handled by the Unity UI System. Mouse input successfully works; however I am unable to get Text input to work despite the fact that Keyboard input is coming in from the browser and I can detect it with Keyboard.current from the Input System.
To Reproduce
- Create a Unity Canvas
- Follow Documentation to make sure mouse input works succesfully : https://github.com/Unity-Technologies/UnityRenderStreaming/blob/develop/com.unity.renderstreaming/Documentation~/browser_input.md
- Create a InputField GameObject
- Using Remote Mouse click on InputField to select the field and get the cursor
- Start Typing and see no input
Expected behavior
InputField should respond to Keyboard input
Environment (please complete the following information):
- Windows + Unity Editor
- Render Streaming : 3.1.0-exp.1
- Input System : 1.0.2
@vmohan7
Sure, we are updating the implementation of the input. The issue might be fixed this timing.
memo: URS-349
I reproduced this issue and understood this problem is difficult to solve...
InputField
class uses the event instance from Event.PopEvent
method to detect keyboard event. But the event instance don't have intended keycode when typing keyboard remotely. ๐
Ah darn. Was hoping to get it out of the box :( For now, I implemented a work around to force the input into the input field, but not exactly ideal without basically duplicating all the functionality of the InputField
Is there any progress of this problem? When this problem can be fixed? ๐
Thanks
There is no progress, unfortunetelly. Sorry for bothering.
Is there any progress? it's been two years. Or could you recommend any workaround allowing me to properly receive text input. thanks.
@tete1030
No progress.
Requires custom implementation in browser and Unity.
Here is my own implementation to force inputs into an input field. Add this as a component under InputReceiver and assign the reference to it. This doesn't support numpads, so if anyone wants to improve this, feel free too. I'm also sure there is a better way to code this without having to use m_HeldKeys.
@JohnnyNgo
Thanks for contribution!
Does anyone try this implementation?
@JohnnyNgo Thanks, it works!
Here is my own implementation to force inputs into an input field. Add this as a component under InputReceiver and assign the reference to it. This doesn't support numpads, so if anyone wants to improve this, feel free too. I'm also sure there is a better way to code this without having to use m_HeldKeys.
thanks seems to be working!!!