From 6c424989b2e5e4db2210ef3629c9862fef4566ae Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Wed, 9 Feb 2022 11:01:31 +0900 Subject: [PATCH] [Tizen] Add forward and backward type for Tab, Shift-Tab key Change-Id: I3f74f543463c776abf3f1d2a4b5e2ce856868fb4 --- .../internal/focus-manager/keyboard-focus-manager-impl.cpp | 8 ++------ dali-toolkit/public-api/controls/control.h | 14 ++++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index b8b8a6d..cc80372 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -901,12 +901,8 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) // "Shift-Tab" key changes it in the backward direction. if(!DoMoveFocusToNextFocusGroup(!event.IsShiftModifier())) { - // If the focus group is not changed, Move the focus towards right, "Shift-Tap" key moves the focus towards left. - if(!MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::LEFT : Toolkit::Control::KeyboardFocus::RIGHT)) - { - // If the focus is not moved, Move the focus towards down, "Shift-Tap" key moves the focus towards up. - MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::UP : Toolkit::Control::KeyboardFocus::DOWN); - } + // If the focus group is not changed, Move the focus towards forward, "Shift-Tap" key moves the focus towards backward. + MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::BACKWARD : Toolkit::Control::KeyboardFocus::FORWARD); } } diff --git a/dali-toolkit/public-api/controls/control.h b/dali-toolkit/public-api/controls/control.h index fb2b5ad..7e6beff 100644 --- a/dali-toolkit/public-api/controls/control.h +++ b/dali-toolkit/public-api/controls/control.h @@ -147,12 +147,14 @@ public: */ enum Direction { - LEFT, ///< Move keyboard focus towards the left direction @SINCE_1_0.0 - RIGHT, ///< Move keyboard focus towards the right direction @SINCE_1_0.0 - UP, ///< Move keyboard focus towards the up direction @SINCE_1_0.0 - DOWN, ///< Move keyboard focus towards the down direction @SINCE_1_0.0 - PAGE_UP, ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14 - PAGE_DOWN ///< Move keyboard focus towards the next page direction @SINCE_1_2.14 + LEFT, ///< Move keyboard focus towards the left direction @SINCE_1_0.0 + RIGHT, ///< Move keyboard focus towards the right direction @SINCE_1_0.0 + UP, ///< Move keyboard focus towards the up direction @SINCE_1_0.0 + DOWN, ///< Move keyboard focus towards the down direction @SINCE_1_0.0 + PAGE_UP, ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14 + PAGE_DOWN, ///< Move keyboard focus towards the next page direction @SINCE_1_2.14 + FORWARD, ///< Move keyboard focus towards the forward direction @SINCE_2_1.10 + BACKWARD, ///< Move keyboard focus towards the backward direction @SINCE_2_1.10 }; }; -- 2.7.4