# pane.Pane.sendKeys

- **Module:** pane
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/pane.ts#L285
- **Page:** https://libtmux.org/en/ts/latest/reference/pane-pane-sendkeys/

```
sendKeys(
  keys: string,
  options?: SendKeysOptions,
): Promise<void>
```

Send keys to this pane, following them with Enter unless told not to.

## Examples

```ts
await pane.sendKeys("echo hello");
await pane.sendKeys("C-c", { literal: false });
```

## Parameters

- `keys` (`string`)
- `options?` (`SendKeysOptions`)

## tmux command

The tmux commands behind `sendKeys`.

- [`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)

## Guides

Pages that discuss `sendKeys`.

### Concepts

- [Control mode vs one-shot](/en/ts/latest/concepts/transports/)

### Guides

- [Sending keys](/en/ts/latest/guides/sending-keys/)

### Topics

- [Pane interaction](/en/ts/latest/topics/pane-interaction/)

## 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) |
| 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 |
| 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) |

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