From c72f7c6f4b29d003ec50d9503dbf8d26a80eecec Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 8 Jul 2024 22:56:31 +0300 Subject: [PATCH] fix focus on mixer page --- src/control.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/control.rs b/src/control.rs index 0379120f..42c41e00 100644 --- a/src/control.rs +++ b/src/control.rs @@ -49,8 +49,14 @@ const KEYMAP_FOCUS: &'static [KeyBinding] = keymap!(App { const KEYMAP: &'static [KeyBinding] = keymap!(App { [F(1), NONE, "help_toggle", "toggle help", |_: &mut App| {Ok(true)}], - [Up, NONE, "focus_prev", "focus previous area", focus_prev], - [Down, NONE, "focus_next", "focus next area", focus_next], + [Up, NONE, "focus_prev", "focus previous area", |app: &mut App|match app.track_cursor { + 0 => {app.section = AppSection::Arranger;Ok(true)}, + _ => focus_prev(app) + }], + [Down, NONE, "focus_next", "focus next area", |app: &mut App|match app.track_cursor { + 0 => {app.section = AppSection::Chain;Ok(true)}, + _ => focus_next(app) + }], [Char(' '), NONE, "play_toggle", "play or pause", |app: &mut App| { app.toggle_play()?;