# LibTmux.Pane.send_keys/4

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

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

Sends 1..128 named keys to an exact pane; unknown names are rejected.

Supports Enter, Space, Tab, BTab, BSpace, Escape, arrows, Home, End, PageUp,
PageDown, Insert, Delete and F1..F12. Distinct C-, M- and S- modifiers may
prefix arrows, Home/End, PageUp/PageDown, Insert/Delete and F1..F12. Also
accepts C-a..C-z, conventional ASCII control punctuation, and M- plus one
printable ASCII character. Unsupported combinations such as S-a and C-Enter
fail before admission; tmux could otherwise type their spelling as text.
Options and outcomes follow `LibTmux.Action`.

    alias LibTmux.Pane

    Pane.send_keys(control, pane_ref, ["Enter", "C-c"])

## Parameters

- `connection` (`LibTmux.Action.connection()`)
- `ref` (`LibTmux.Ref.t()`)
- `keys` (`[String.t()]`)
- `options` (`[LibTmux.Action.option()]`)
