From 51429bd8d6d2fed9636e1d252a5eb86567b846ec Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Thu, 13 Mar 2014 16:58:03 +0800 Subject: fix android can't input unicode characters fix hide soft keyboard by press 'back' button, then click current focus text edit/line edit control, soft keyboard won't show again add features: press enter key with line edit control will hide soft keyboard --- scene/gui/line_edit.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene/gui/line_edit.cpp') diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 22316acab..6c9db7484 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -79,6 +79,9 @@ void LineEdit::_input_event(InputEvent p_event) { } selection.creating=false; selection.doubleclick=false; + + // notify to show soft keyboard + notification(NOTIFICATION_FOCUS_ENTER); } update(); @@ -208,6 +211,8 @@ void LineEdit::_input_event(InputEvent p_event) { case KEY_RETURN: { emit_signal( "text_entered",text ); + // notify to hide soft keyboard + notification(NOTIFICATION_FOCUS_EXIT); return; } break; -- cgit v1.2.3-70-g09d2