From 8b0c615322787085c795fff23bcd044c7c15e9df Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Thu, 13 Nov 2025 08:58:40 -0500 Subject: [PATCH] Launcher: restore Tab/BackTab navigation. Fix #737 --- Modules/Panels/Launcher/Launcher.qml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index 3ee4bc57..88d07bb2 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -50,7 +50,10 @@ SmartPanel { readonly property int badgeSize: Math.round(Style.baseWidgetSize * 1.6) readonly property int entryHeight: Math.round(badgeSize + Style.marginM * 2) - // Override keyboard handlers from SmartPanel for navigation + // Override keyboard handlers from SmartPanel for navigation. + // Launcher specific: onTabPressed() and onBackTabPressed() are special here. + // They are not coming from SmartPanelWindow as they are consumed by the search field before reaching the panel. + // They are instead being forwared from the search field NTextInput below. function onTabPressed() { selectNextWrapped() } @@ -346,6 +349,16 @@ SmartPanel { Component.onCompleted: { if (searchInput.inputItem) { searchInput.inputItem.forceActiveFocus() + // Intercept Tab keys before TextField handles them + searchInput.inputItem.Keys.onPressed.connect(function (event) { + if (event.key === Qt.Key_Tab) { + root.onTabPressed() + event.accepted = true + } else if (event.key === Qt.Key_Backtab) { + root.onBackTabPressed() + event.accepted = true + } + }) } } }