Skip to main content

Module input_macro

Module input_macro 

Source
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(&macro_recording);
player.replay_all(&mut sim);

Structs§

EventRecorder
Records events from a live event stream with start/stop/pause control.
FilteredEventRecorder
A filtered event recorder that only records events matching a filter.
InputMacro
A recorded sequence of input events with timing.
MacroMetadata
Metadata about a recorded macro.
MacroPlayback
Deterministic playback scheduler with speed and looping controls.
MacroPlayer
Replays an InputMacro through a [ProgramSimulator].
MacroRecorder
Records input events with timing into an InputMacro.
RecordingFilter
Filter specification for recording.
TimedEvent
A recorded input event with timing relative to recording start.

Enums§

RecordingState
State of an EventRecorder.