From 383857669bd64400ce3c79fdfbd853e3b7fdb474 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Mon, 23 Mar 2026 11:54:04 +0100 Subject: [PATCH] polish: add Left/Right key navigation to category rail tab delegates When a tab delegate has focus, Left/Right now navigates to the adjacent tab and selects it via _applyIndex, mirroring the gamepad LB/RB behavior. --- src/qml/ConsoleCategoryRail.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qml/ConsoleCategoryRail.qml b/src/qml/ConsoleCategoryRail.qml index 5a131d9..7e0f0c9 100644 --- a/src/qml/ConsoleCategoryRail.qml +++ b/src/qml/ConsoleCategoryRail.qml @@ -218,6 +218,18 @@ Item { } Keys.onDownPressed: root.focusDownRequested() + Keys.onLeftPressed: { + if (tabList.currentIndex > 0) { + root._applyIndex(tabList.currentIndex - 1) + Qt.callLater(function() { if (tabList.currentItem) tabList.currentItem.forceActiveFocus() }) + } + } + Keys.onRightPressed: { + if (tabList.currentIndex < sourceModel.count - 1) { + root._applyIndex(tabList.currentIndex + 1) + Qt.callLater(function() { if (tabList.currentItem) tabList.currentItem.forceActiveFocus() }) + } + } } } }