diff --git a/crates/tek/src/tui/phrase_editor.rs b/crates/tek/src/tui/phrase_editor.rs index 53354dae..9e58a731 100644 --- a/crates/tek/src/tui/phrase_editor.rs +++ b/crates/tek/src/tui/phrase_editor.rs @@ -40,7 +40,7 @@ impl PhraseEditorModel { fn phrase_length (&self) -> usize { self.phrase().as_ref().map(|p|p.read().unwrap().length).unwrap_or(1) } - const KEYS: [(TuiEvent, &'static dyn Fn(&Self)->PhraseCommand);27] = [ + const KEYS: [(TuiEvent, &'static dyn Fn(&Self)->PhraseCommand);31] = [ (kexp!(Ctrl-Alt-Up), &|s: &Self|SetNoteScroll(s.note_point() + 3)), (kexp!(Ctrl-Alt-Down), &|s: &Self|SetNoteScroll(s.note_point().saturating_sub(3))), (kexp!(Ctrl-Alt-Left), &|s: &Self|SetTimeScroll(s.time_point().saturating_sub(s.time_zoom().get()))), @@ -54,9 +54,13 @@ impl PhraseEditorModel { (kexp!(Alt-Left), &|s: &Self|SetTimeCursor(s.time_point().saturating_sub(s.time_zoom().get()))), (kexp!(Alt-Right), &|s: &Self|SetTimeCursor((s.time_point() + s.time_zoom().get()) % s.phrase_length())), (kexp!(Up), &|s: &Self|SetNoteCursor(s.note_point() + 1)), + (kexp!(Char('w')), &|s: &Self|SetNoteCursor(s.note_point() + 1)), (kexp!(Down), &|s: &Self|SetNoteCursor(s.note_point().saturating_sub(1))), + (kexp!(Char('s')), &|s: &Self|SetNoteCursor(s.note_point().saturating_sub(1))), (kexp!(Left), &|s: &Self|SetTimeCursor(s.time_point().saturating_sub(s.note_len()))), + (kexp!(Char('a')), &|s: &Self|SetTimeCursor(s.time_point().saturating_sub(s.note_len()))), (kexp!(Right), &|s: &Self|SetTimeCursor((s.time_point() + s.note_len()) % s.phrase_length())), + (kexp!(Char('d')), &|s: &Self|SetTimeCursor((s.time_point() + s.note_len()) % s.phrase_length())), (kexp!(Char('z')), &|s: &Self|SetTimeLock(!s.time_lock().get())), (kexp!(Char('-')), &|s: &Self|SetTimeZoom(Note::next(s.time_zoom().get()))), (kexp!(Char('_')), &|s: &Self|SetTimeZoom(Note::next(s.time_zoom().get()))),