diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index d9acbeb828d7..798425966073 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -490,9 +490,7 @@ void LineEdit::gui_input(const Ref &p_event) { // Allow unicode handling if: // * No Modifiers are pressed (except shift) - bool allow_unicode_handling = !(k->is_command_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed()); - - if (allow_unicode_handling && editable && k->get_unicode() >= 32) { + if (editable && k->get_unicode() >= 32) { // Handle Unicode (if no modifiers active) selection_delete(); char32_t ucodestr[2] = { (char32_t)k->get_unicode(), 0 }; @@ -501,7 +499,6 @@ void LineEdit::gui_input(const Ref &p_event) { if (text.length() != prev_len) { _text_changed(); } - accept_event(); } } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index b9e9a4d45072..98ef0980d6f2 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1583,10 +1583,6 @@ void TextEdit::gui_input(const Ref &p_gui_input) { _reset_caret_blink_timer(); - // Allow unicode handling if: - // * No Modifiers are pressed (except shift) - bool allow_unicode_handling = !(k->is_command_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed()); - selection.selecting_text = false; // Check and handle all built in shortcuts. @@ -1794,9 +1790,8 @@ void TextEdit::gui_input(const Ref &p_gui_input) { } // Handle Unicode (if no modifiers active). Tab has a value of 0x09. - if (allow_unicode_handling && editable && (k->get_unicode() >= 32 || k->get_keycode() == KEY_TAB)) { + if (editable && (k->get_unicode() >= 32 || k->get_keycode() == KEY_TAB)) { handle_unicode_input(k->get_unicode()); - accept_event(); return; } }