Skip to content

Commit

Permalink
[Android] Auto-hide keyboard when it's no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
JVital2013 committed Oct 2, 2023
1 parent 06df6a8 commit 3979e55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ void tick()
static bool WantTextInputLast = false;
if (io.WantTextInput && !WantTextInputLast)
ShowSoftKeyboardInput();
if (!io.WantTextInput && WantTextInputLast)
HideSoftKeyboardInput();
WantTextInputLast = io.WantTextInput;

// Start the Dear ImGui frame
Expand Down

0 comments on commit 3979e55

Please sign in to comment.