dirty flag ui
This commit is contained in:
100
src/app.rs
100
src/app.rs
@@ -280,38 +280,98 @@ impl App {
|
|||||||
(KeyModifiers::CONTROL, KeyCode::Char('c')) => return Ok(true),
|
(KeyModifiers::CONTROL, KeyCode::Char('c')) => return Ok(true),
|
||||||
|
|
||||||
// Deck focus
|
// Deck focus
|
||||||
(KeyModifiers::NONE, KeyCode::Char('a')) => self.focused_deck = 0,
|
(KeyModifiers::NONE, KeyCode::Char('a')) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Char('z')) => self.focused_deck = 1,
|
self.focused_deck = 0;
|
||||||
(KeyModifiers::NONE, KeyCode::Char('s')) => self.focused_deck = 2,
|
self.dirty = true;
|
||||||
(KeyModifiers::NONE, KeyCode::Char('x')) => self.focused_deck = 3,
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char('z')) => {
|
||||||
|
self.focused_deck = 1;
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char('s')) => {
|
||||||
|
self.focused_deck = 2;
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char('x')) => {
|
||||||
|
self.focused_deck = 3;
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Open file selector
|
// Open file selector
|
||||||
(KeyModifiers::SHIFT, KeyCode::Char('A')) => self.open_selector(0),
|
(KeyModifiers::SHIFT, KeyCode::Char('A')) => {
|
||||||
(KeyModifiers::SHIFT, KeyCode::Char('Z')) => self.open_selector(1),
|
self.open_selector(0);
|
||||||
(KeyModifiers::SHIFT, KeyCode::Char('S')) => self.open_selector(2),
|
self.dirty = true;
|
||||||
(KeyModifiers::SHIFT, KeyCode::Char('X')) => self.open_selector(3),
|
},
|
||||||
|
(KeyModifiers::SHIFT, KeyCode::Char('Z')) => {
|
||||||
|
self.open_selector(1);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::SHIFT, KeyCode::Char('S')) => {
|
||||||
|
self.open_selector(2);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::SHIFT, KeyCode::Char('X')) => {
|
||||||
|
self.open_selector(3);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Transport
|
// Transport
|
||||||
(KeyModifiers::NONE, KeyCode::Char(' ')) => self.toggle_play(),
|
(KeyModifiers::NONE, KeyCode::Char(' ')) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Enter) => self.stop_focused(),
|
self.toggle_play();
|
||||||
(KeyModifiers::NONE, KeyCode::Left) => self.seek_relative(-0.01),
|
self.dirty = true;
|
||||||
(KeyModifiers::NONE, KeyCode::Right) => self.seek_relative(0.01),
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Enter) => {
|
||||||
|
self.stop_focused();
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Left) => {
|
||||||
|
self.seek_relative(-0.01);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Right) => {
|
||||||
|
self.seek_relative(0.01);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Cue
|
// Cue
|
||||||
(KeyModifiers::NONE, KeyCode::Char('c')) => self.set_cue(),
|
(KeyModifiers::NONE, KeyCode::Char('c')) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Char('v')) => self.goto_cue(),
|
self.set_cue();
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char('v')) => {
|
||||||
|
self.goto_cue();
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Fader → wpctl
|
// Fader → wpctl
|
||||||
(KeyModifiers::NONE, KeyCode::Up) => self.nudge_fader(0.05),
|
(KeyModifiers::NONE, KeyCode::Up) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Down) => self.nudge_fader(-0.05),
|
self.nudge_fader(0.05);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Down) => {
|
||||||
|
self.nudge_fader(-0.05);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Pitch → pw-cli filter-chain Props
|
// Pitch → pw-cli filter-chain Props
|
||||||
(KeyModifiers::NONE, KeyCode::Char(']')) => self.nudge_pitch(0.5),
|
(KeyModifiers::NONE, KeyCode::Char(']')) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Char('[')) => self.nudge_pitch(-0.5),
|
self.nudge_pitch(0.5);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char('[')) => {
|
||||||
|
self.nudge_pitch(-0.5);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
// Tempo → pw-cli filter-chain Props
|
// Tempo → pw-cli filter-chain Props
|
||||||
(KeyModifiers::NONE, KeyCode::Char('.')) => self.nudge_tempo(0.01),
|
(KeyModifiers::NONE, KeyCode::Char('.')) => {
|
||||||
(KeyModifiers::NONE, KeyCode::Char(',')) => self.nudge_tempo(-0.01),
|
self.nudge_tempo(0.01);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
(KeyModifiers::NONE, KeyCode::Char(',')) => {
|
||||||
|
self.nudge_tempo(-0.01);
|
||||||
|
self.dirty = true;
|
||||||
|
},
|
||||||
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user