From: joogab.yun Date: Wed, 9 Feb 2022 02:01:31 +0000 (+0900) Subject: Add forward and backward type for Tab, Shift-Tab key X-Git-Tag: dali_2.1.10~3^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=48ff6664498c490d75e2bebfed14b0a9cc6eb9f1;hp=d7bf9a0c46a7900e7c066711463babd639154f73 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 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 cbcb6ff..7ac183e 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 }; };