From: Joogab Yun Date: Fri, 9 Jul 2021 06:41:24 +0000 (+0900) Subject: Add Tab key focus movement. X-Git-Tag: dali_2.0.35~4^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=aefac7b91818861d25e2312ea4b63d2deb1a9a86 Add Tab key focus movement. If the focus group is not changed, Move the focus towards right, "Shift-Tap" key moves the focus towards left. Still if the focus is not moved, Move the focus towards down, "Shift-Tap" key moves the focus towards up. Change-Id: Iecfbe8a94ca96caff580714ef94ead7002e01e4b --- 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 8dadb11..c03b7dd 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -878,7 +878,15 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) { // "Tab" key changes the focus group in the forward direction and // "Shift-Tab" key changes it in the backward direction. - DoMoveFocusToNextFocusGroup(!event.IsShiftModifier()); + 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); + } + } } isFocusStartableKey = true;