factor keys into odules

This commit is contained in:
🪞👃🪞 2025-01-27 22:51:22 +01:00
parent 0999c42f12
commit 6bb73e3896
7 changed files with 176 additions and 165 deletions

11
tek/src/keys_ins.rs Normal file
View file

@ -0,0 +1,11 @@
use crate::*;
#[derive(Clone, Debug)] pub enum InputCommand { Add }
atom_command!(InputCommand: |app: Tek| {
("add" [] Some(Self::Add))
});
command!(|self: InputCommand, app: Tek|match self {
Self::Add => {
app.midi_ins.push(JackMidiIn::new(&app.jack, &format!("M/{}", app.midi_ins.len()), &[])?);
None
},
});