diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f8c31121be7..1f493e3913a 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3506,6 +3506,10 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } break; case KEY_Z: { + if (readonly) { + break; + } + if (!k->get_command()) { scancode_handled = false; break; @@ -3518,6 +3522,10 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } break; case KEY_Y: { + if (readonly) { + break; + } + if (!k->get_command()) { scancode_handled = false; break;