diff --git a/client/ui/qml/Components/SelectLanguageDrawer.qml b/client/ui/qml/Components/SelectLanguageDrawer.qml index 678ecf64..a48515cc 100644 --- a/client/ui/qml/Components/SelectLanguageDrawer.qml +++ b/client/ui/qml/Components/SelectLanguageDrawer.qml @@ -65,6 +65,30 @@ DrawerType2 { property bool isFocusable: true + Keys.onTabPressed: { + FocusController.nextKeyTabItem() + } + + Keys.onBacktabPressed: { + FocusController.previousKeyTabItem() + } + + Keys.onUpPressed: { + FocusController.nextKeyUpItem() + } + + Keys.onDownPressed: { + FocusController.nextKeyDownItem() + } + + Keys.onLeftPressed: { + FocusController.nextKeyLeftItem() + } + + Keys.onRightPressed: { + FocusController.nextKeyRightItem() + } + model: LanguageModel currentIndex: LanguageModel.currentLanguageIndex @@ -72,48 +96,10 @@ DrawerType2 { id: buttonGroup } - // activeFocusOnTab: true - // onActiveFocusChanged: { - // if (activeFocus) { - // this.currentFocusIndex = 0 - // this.itemAtIndex(currentFocusIndex).forceActiveFocus() - // } - // } - - // Keys.onTabPressed: { - // if (currentFocusIndex < this.count - 1) { - // currentFocusIndex += 1 - // this.itemAtIndex(currentFocusIndex).forceActiveFocus() - // } else { - // listViewFocusItem.forceActiveFocus() - // focusItem.forceActiveFocus() - // } - // } - - // Item { - // id: listViewFocusItem // TODO: delete? - // Keys.onTabPressed: { - // root.forceActiveFocus() - // } - // } - - // onVisibleChanged: { - // if (visible) { - // listViewFocusItem.forceActiveFocus() - // focusItem.forceActiveFocus() - // } - // } - delegate: Item { implicitWidth: root.width implicitHeight: delegateContent.implicitHeight - // onActiveFocusChanged: { - // if (activeFocus) { - // radioButton.forceActiveFocus() - // } - // } - ColumnLayout { id: delegateContent diff --git a/client/ui/qml/Controls2/ListViewWithRadioButtonType.qml b/client/ui/qml/Controls2/ListViewWithRadioButtonType.qml index 230f37eb..dda20313 100644 --- a/client/ui/qml/Controls2/ListViewWithRadioButtonType.qml +++ b/client/ui/qml/Controls2/ListViewWithRadioButtonType.qml @@ -77,6 +77,8 @@ ListView { hoverEnabled: true + property bool isFocusable: true + indicator: Rectangle { width: parent.width - 1 height: parent.height diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index 01e623b6..14cc6896 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -246,6 +246,10 @@ PageType { } Keys.onPressed: function(event) { + if(event.key === Qt.Key_Tab) { + FocusController.nextKeyTabItem() + } + PageController.keyPressEvent(event.key) event.accepted = true }