mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip: big flat pt.9: down to 141, looking good!
This commit is contained in:
parent
e958b4a2d2
commit
d01aa7481b
7 changed files with 39 additions and 12 deletions
|
|
@ -30,8 +30,11 @@ pub enum PhraseCommand {
|
|||
}
|
||||
|
||||
event_map_input_to_command!(Tui: MidiEditor: PhraseCommand: MidiEditor::KEYS);
|
||||
|
||||
pub(crate) type KeyMapping<const N: usize, E, T, U> = [(E, &'static dyn Fn(&T)->U);N];
|
||||
|
||||
impl MidiEditor {
|
||||
const KEYS: KeyMapping<31, Self> = [
|
||||
const KEYS: KeyMapping<31, Event, Self, PhraseCommand> = [
|
||||
(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()))),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue