# LibTmux.Pane.send_text/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/entities.ex#L683
- **Page:** https://libtmux.org/en/elixir/pr-173/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..995 literal bytes to an exact pane, without interpreting key names.

Hex-key encoding preserves NUL and invalid UTF-8. Empty input sends nothing.
Both transports use the same limit, fitting tmux 3.8's command argument
ceiling. Larger inputs fail validation before I/O; calls are never split.
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()]`)
  Default: `[]`.
