mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Launcher: restore Tab/BackTab navigation. Fix #737
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user