aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/ttyplay/input.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-05 03:28:56 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-05 03:28:56 -0500
commit8fae72f67707924118f965b9e14b5838e41cc3ad (patch)
treee0f547da9e2a249d672d0ed3ec5fc4ce4f6cde7f /src/bin/ttyplay/input.rs
parent84860b34b93047821584ca21824cd0fb5f9b3f24 (diff)
downloadttyrec-bin-8fae72f67707924118f965b9e14b5838e41cc3ad.tar.gz
ttyrec-bin-8fae72f67707924118f965b9e14b5838e41cc3ad.zip
implement speeding up and slowing down
Diffstat (limited to 'src/bin/ttyplay/input.rs')
-rw-r--r--src/bin/ttyplay/input.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/ttyplay/input.rs b/src/bin/ttyplay/input.rs
index d8c8e92..8c45b69 100644
--- a/src/bin/ttyplay/input.rs
+++ b/src/bin/ttyplay/input.rs
@@ -30,6 +30,16 @@ pub fn spawn_task(
crate::event::TimerAction::Pause,
),
textmode::Key::Ctrl(b'i') => crate::event::Event::ToggleUi,
+ textmode::Key::Char('=' | '+') => {
+ crate::event::Event::TimerAction(
+ crate::event::TimerAction::SpeedUp,
+ )
+ }
+ textmode::Key::Char('_' | '-') => {
+ crate::event::Event::TimerAction(
+ crate::event::TimerAction::SlowDown,
+ )
+ }
_ => continue,
};
event_w.send(event).await.unwrap();