From a1e9c0a4566065d5fb7c5167e797596fc3f5042b Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Mon, 4 Dec 2023 15:10:05 +0900 Subject: [PATCH] [Tizen] Fix key event consumption issue in text field The keycode for '$' and `RETURN` are the same on a specific device. To avoid this problem, check the key name. Change-Id: I743688b69e10b0bcb83476bbad8616791eebb5ea Signed-off-by: Bowon Ryu --- dali-toolkit/internal/controls/text-controls/text-field-impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 9b78346..7ef5425 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -63,6 +63,7 @@ namespace Internal namespace // unnamed namespace { const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::DevelText::DEFAULT_RENDERING_BACKEND; +const char* KEY_RETURN_NAME = "Return"; } // unnamed namespace namespace @@ -861,7 +862,7 @@ bool TextField::OnKeyEvent(const KeyEvent& event) return true; } - else if(Dali::DevelKey::DALI_KEY_RETURN == event.GetKeyCode()) + else if(Dali::DevelKey::DALI_KEY_RETURN == event.GetKeyCode() && KEY_RETURN_NAME == event.GetKeyName()) { // Do nothing when enter is comming. return false; -- 2.7.4