mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 21:26:43 +01:00
31 lines
1.1 KiB
Rust
31 lines
1.1 KiB
Rust
use crate::*;
|
|
|
|
handle!(Track |self, event| handle_keymap(self, event, KEYMAP_TRACK));
|
|
|
|
/// Key bindings for chain section.
|
|
pub const KEYMAP_TRACK: &'static [KeyBinding<Track>] = keymap!(Track {
|
|
[Up, NONE, "chain_cursor_up", "move cursor up", |_: &mut Track| {
|
|
Ok(true)
|
|
}],
|
|
[Down, NONE, "chain_cursor_down", "move cursor down", |_: &mut Track| {
|
|
Ok(true)
|
|
}],
|
|
[Left, NONE, "chain_cursor_left", "move cursor left", |app: &mut Track| {
|
|
//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 Track| {
|
|
//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 Track| {
|
|
//app.chain_mode = !app.chain_mode;
|
|
Ok(true)
|
|
}],
|
|
});
|