# tmux_pane:send_keys/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_pane.erl#L401
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_pane-send_keys-2/

```
send_keys(Pane, Keys)
-spec send_keys(tmux_model:pane(), [key()]) ->
                   {ok, map()} | {error, map()}.
```

Send at most 256 validated key tokens. Named keys, single UTF-8 characters, function keys and control-letter tuples are supported. Performs I/O; terminal modes determine the resulting input bytes. Use `send_text/2` for arbitrary bytes.

## Parameters

- `Pane` (`tmux_model:pane()`)
- `Keys` (`[key()]`)

## tmux command

The tmux commands behind `send_keys/2`.

- [`send-keys`](/en/tmux/latest/manual/send-keys/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_send_keys_entry`](/en/tmux/latest/reference/c-variable-cmd_send_keys_entry/) (attribute)
- [`cmd_send_keys_exec`](/en/tmux/latest/reference/c-function-cmd-send-keys-c-cmd_send_keys_exec/) (function)

## In other ports

Send keystrokes to a pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.send_keys`](/en/py/latest/reference/libtmux-pane-send_keys/) (method) |
| Ruby | [`LibTmux::Pane#send_keys`](/en/ruby/latest/reference/libtmux-pane-send_keys/) (method) |
| Lua | [`libtmux.Pane:send_keys`](/en/lua/latest/reference/libtmux-pane-send_keys/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| Common Lisp | [`libtmux:send-keys`](/en/lisp/latest/reference/libtmux-send-keys/) (function) |
| TypeScript | [`pane.Pane.sendKeys`](/en/ts/latest/reference/pane-pane-sendkeys/) (method) |
| Rust | [`pane.Pane.send_keys`](/en/rs/latest/reference/pane-pane-send_keys/) (method) |
| Go | [`tmux.Pane.SendKeys`](/en/go/latest/reference/tmux-pane-sendkeys/) (method) |
| Java | no direct equivalent; `Pane.paste` writes a buffer instead |
| Clojure | [`libtmux.core/send-keys!`](/en/clojure/latest/reference/libtmux-core-send-keys/) (function) |
| Kotlin | [`io.github.libtmux.kotlin.Pane.sendKeys`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane-sendkeys/) (method) |
| Scala | [`io.github.libtmux.scaladsl.Pane.sendKeys`](/en/scala/latest/reference/io-github-libtmux-scaladsl-pane-sendkeys/) (method) |
| C# | [`LibTmux.Pane.SendKeysAsync`](/en/csharp/latest/reference/libtmux-pane-sendkeysasync/) (method) |
| C++ | [`libtmux::Pane::send_text`](/en/cxx/latest/reference/libtmux-pane-send_text/) (method) |
| Swift | [`Server.sendKeys(_:to:literally:)`](/en/swift/latest/reference/server-sendkeys(_-to-literally-)/) (method) |
| OCaml | [`Libtmux_unix.Client.send_keys`](/en/ocaml/latest/reference/libtmux_unix-client-send_keys/) (function) |
| Perl | [`LibTmux::Server::send_keys`](/en/perl/latest/reference/libtmux-server-send_keys/) (method). Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes. |

No equivalent is recorded in PowerShell, Julia, Elixir or F#.
