# LibTmux.Pane.send_text/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/entities.ex#L314
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-pane-send_text-4/

```
send_text(connection, ref, bytes, options \\ [])
@spec send_text(
        LibTmux.Action.connection(),
        LibTmux.Ref.t(),
        binary(),
        [LibTmux.Action.option()]
      ) ::
        {:ok, LibTmux.Action.result(:ok)}
        | {:error, LibTmux.Action.error()}
```

Sends 0..1020 literal bytes to an exact pane, without interpreting key names.

Hex-key encoding preserves NUL and invalid UTF-8. Empty input sends nothing.
The terminal's line discipline, active mode and application still determine
how input is handled; acknowledgement does not prove program consumption.
Options and outcomes follow `LibTmux.Action`. For named keys use `send_keys/4`.

    alias LibTmux.Pane

    Pane.send_text(control, pane_ref, "printf 'hello'")

## Parameters

- `connection` (`LibTmux.Action.connection()`)
- `ref` (`LibTmux.Ref.t()`)
- `bytes` (`binary()`)
- `options` (`[LibTmux.Action.option()]`)
