mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-18 09:56:41 +01:00
factor keys into odules
This commit is contained in:
parent
0999c42f12
commit
6bb73e3896
7 changed files with 176 additions and 165 deletions
11
tek/src/keys_ins.rs
Normal file
11
tek/src/keys_ins.rs
Normal 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
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue