From: joogab.yun Date: Wed, 9 Feb 2022 02:01:31 +0000 (+0900) Subject: [Tizen] Add forward and backward type for Tab, Shift-Tab key X-Git-Tag: accepted/tizen/6.0/unified/20220408.080206~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=127908d8d9d7ef0c3df79da6d5cc13b78d1085af [Tizen] Add forward and backward type for Tab, Shift-Tab key Change-Id: I3f74f543463c776abf3f1d2a4b5e2ce856868fb4 --- 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 73f023f..b585d56 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -909,12 +909,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 7720d13..17b6421 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 }; };