Expand description
Input macro recording and playback.
Record terminal input events with timing information for deterministic
replay through the ProgramSimulator.
§Example
ⓘ
use ftui_runtime::input_macro::{InputMacro, MacroRecorder, MacroPlayer};
use ftui_runtime::simulator::ProgramSimulator;
use ftui_core::event::Event;
use std::time::Duration;
// Record events
let mut recorder = MacroRecorder::new("test_flow");
recorder.record_event(some_event.clone());
// ... time passes ...
recorder.record_event(another_event.clone());
let macro_recording = recorder.finish();
// Replay through simulator
let mut sim = ProgramSimulator::new(my_model);
sim.init();
let mut player = MacroPlayer::new(¯o_recording);
player.replay_all(&mut sim);Structs§
- Event
Recorder - Records events from a live event stream with start/stop/pause control.
- Filtered
Event Recorder - A filtered event recorder that only records events matching a filter.
- Input
Macro - A recorded sequence of input events with timing.
- Macro
Metadata - Metadata about a recorded macro.
- Macro
Playback - Deterministic playback scheduler with speed and looping controls.
- Macro
Player - Replays an
InputMacrothrough a [ProgramSimulator]. - Macro
Recorder - Records input events with timing into an
InputMacro. - Recording
Filter - Filter specification for recording.
- Timed
Event - A recorded input event with timing relative to recording start.
Enums§
- Recording
State - State of an
EventRecorder.