From c45678e85750ef81ea01cbef244d0edee3ffc1d1 Mon Sep 17 00:00:00 2001
From: Leon Styhre <leon@leonstyhre.com>
Date: Sun, 18 Sep 2022 15:35:13 +0200
Subject: [PATCH] Fixed an issue where line breaks could not be inserted into
 multline text entry fields.

---
 es-core/src/components/TextEditComponent.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp
index 29f6c7eb8..ff5406a82 100644
--- a/es-core/src/components/TextEditComponent.cpp
+++ b/es-core/src/components/TextEditComponent.cpp
@@ -155,11 +155,16 @@ bool TextEditComponent::input(InputConfig* config, Input input)
     if (mEditing) {
         if (config->getDeviceId() == DEVICE_KEYBOARD) {
             // Special handling for keyboard input as the "A" and "B" buttons are overridden.
-            if (input.id == SDLK_RETURN) {
-                if (isMultiline())
+            if (input.id == SDLK_RETURN || input.id == SDLK_KP_ENTER) {
+                if (isMultiline()) {
+                    const bool maskValue {mMaskInput};
+                    mMaskInput = false;
                     textInput("\n");
-                else
+                    mMaskInput = maskValue;
+                }
+                else {
                     stopEditing();
+                }
 
                 return true;
             }