View Source Termite.Terminal.IODevice (Termite v0.4.5)
Terminal adapter for an existing Erlang I/O device, such as an SSH shell's
group leader. The device must support character reads, writes, and the
:echo and :binary I/O options. Geometry queries are optional.
terminal = Termite.Terminal.start(
adapter: Termite.Terminal.IODevice,
device: Process.group_leader()
)The adapter disables echo while active and restores the previous I/O options
when stopped or when its owner exits. It sends input, :winch, and :hup
messages through the standard Termite reader reference. Geometry is checked
every 250 ms when the device supports it.
This adapter does not switch a physical terminal into raw mode. Use the
default adapter for a local terminal. Stop the adapter with Termite.Terminal.stop/1 after
restoring any screen modes enabled by the application.
Summary
Functions
Returns a specification to start this module under a supervisor.
Stops the adapter and restores the device's previous I/O options.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Stops the adapter and restores the device's previous I/O options.