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 + } + }) } } }