0 votes

Hello i'm doing a mobile game and i create some code to move the camera when user is writing in a line edit, but if i hide the keyboard using back button the keyboard hide but the game do not detect that the keyboard is no longer there so the camera do not go back to the original position.

How i can check if a keyboard is visible?

asked Sep 13, 2019 in Engine by Manuel (70 points)

1 Answer

0 votes

getvirtualkeyboard_height ( ) will return 0 if the keyboard is not shown.

answered Sep 13, 2019 by andersmmg (418 points)

ok i will try that ! thanks

getvirtualkeyboard_height ( ) is always 0 , is not working i have a galaxy A10, android 9 i don't know if that the reason, maybe do not work in this version of android

Odd, I've done it on both Android Pie and Android 10 and it worked. Are you using the builtin keyboard or a custom one?

the builtin keyboard, how you did it ? , you have an example code

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.