Opal::Asciicast::Driver
Inherits Opal::Terminal::Driver < Reference < Object
Headless terminal driver that records all screen output directly into an Asciinema v2 recording (.cast) stream. Allows any Opal application, TEA program, form wizard, or interactive UI to be driven and recorded headlessly.
Constructors
Instance methods
event_queue
Sourceevent_queue=(event_queue : Array(Terminal::KeyEvent | Terminal::MouseEvent | Terminal::ResizeEvent))
Sourceflush
Sourcein_raw_mode?
Sourceinject_event(event : Terminal::KeyEvent | Terminal::MouseEvent | Terminal::ResizeEvent) : self
Injects a keyboard or mouse event into the driver's input stream
inject_key(name : String, char : Char | Nil = nil, ctrl : Bool = false, alt : Bool = false, shift : Bool = false) : self
Convenience helper: injects a keyboard event
inject_mouse(x : Int32, y : Int32, button : Terminal::MouseButton = Terminal::MouseButton::Left, action : Terminal::MouseAction = Terminal::MouseAction::Press) : self
Convenience helper: injects a mouse event
poll_event(timeout_ms : Int32 = 0) : Terminal::KeyEvent | Terminal::MouseEvent | Terminal::ResizeEvent | Nil
Non-blocking or timed check for input/resize events.
time_advance
Sourceto_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
writer
Source