Tab to move quicker between sections

This commit is contained in:
David Heinemeier Hansson
2026-05-22 08:46:19 +02:00
parent 127a43a700
commit 181ce06a5b
2 changed files with 18 additions and 0 deletions
+12
View File
@@ -169,6 +169,17 @@ Panel {
}
}
function moveSection(delta) {
var sections = visibleSections
if (sections.length === 0) return
var current = sections.indexOf(focusSection)
if (current < 0) current = delta > 0 ? -1 : 0
var next = (current + delta + sections.length) % sections.length
focusSection = sections[next]
selectedIndex = sectionHasSlider(focusSection) ? -1 : 0
cursorActive = true
}
// Adjust the slider associated with the focused section. Output and
// input sliders are real volume controls; on stream rows h/l adjusts
// that stream's volume (so keyboard parity with the inline slider).
@@ -575,6 +586,7 @@ Panel {
}
onActivateRequested: if (root.cursorActive) root.activateCursor()
onCloseRequested: root.close()
onTabRequested: function(direction) { root.moveSection(direction) }
onTextKey: function(t) {
// 'm' mutes whatever the cursor is on: focused section's slider
// for output/input, the focused stream for streams.