+2 votes

Is there a way to forward the keyboard input to sub-viewports? According to the documentation, this should happen automatically but it does not work for me. It would be nice if one could call _input(event) on specific nodes explicitly. However, this does not seem to be intended.

Context: I would like to have a TextEdit (in a sub-viewport) as texture in the parent 3D scene. Btw, calling grab_focus() in the sub-viewport also does not lead to getting input events.

Thanks for suggestions.

in Engine by (39 points)
edited by

1 Answer

+1 vote

Ok, I missed that Viewport.input(event) can be called which solves this issue for me. Nevertheless, at least when Viewport is set as render target, it won't receive input events automatically.

by (26 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.