feat: run stub tek_chain

This commit is contained in:
🪞👃🪞 2024-08-06 16:56:23 +03:00
parent 2a60808239
commit c089e6cfa4
9 changed files with 60 additions and 38 deletions

View file

@ -135,34 +135,6 @@ pub const KEYMAP_GLOBAL: &'static [KeyBinding<App>] = keymap!(App {
}],
});
/// Key bindings for chain section.
pub const KEYMAP_CHAIN: &'static [KeyBinding<App>] = keymap!(App {
[Up, NONE, "chain_cursor_up", "move cursor up", |_: &mut App| {
Ok(true)
}],
[Down, NONE, "chain_cursor_down", "move cursor down", |_: &mut App| {
Ok(true)
}],
[Left, NONE, "chain_cursor_left", "move cursor left", |app: &mut App| {
if let Some(track) = app.arranger.track_mut() {
track.device = track.device.saturating_sub(1);
return Ok(true)
}
Ok(false)
}],
[Right, NONE, "chain_cursor_right", "move cursor right", |app: &mut App| {
if let Some(track) = app.arranger.track_mut() {
track.device = (track.device + 1).min(track.devices.len().saturating_sub(1));
return Ok(true)
}
Ok(false)
}],
[Char('`'), NONE, "chain_mode_switch", "switch the display mode", |app: &mut App| {
app.chain_mode = !app.chain_mode;
Ok(true)
}],
});
/// Generic key bindings for views that support focus.
pub const KEYMAP_FOCUS: &'static [KeyBinding<App>] = keymap!(App {
[Char(';'), NONE, "command", "open command palette", |_: &mut App| {