Tab to move quicker between sections
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user