# LibTmux::Server::send_text

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Perl
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-perl/blob/352715a4fa66a96eed7763b90daaa536aa2f121d/packages/core/lib/LibTmux/Server.pm#L1054
- **Page:** https://libtmux.org/en/perl/latest/reference/libtmux-server-send_text/

```
sub send_text($self, %args)
```

`send_text(pane => Pane|pane_id, text => string|bytes, enter => boolean?)`.

Send literal text/bytes to a [`LibTmux::Pane`](/en/perl/latest/reference/libtmux-pane/), then optionally send Enter. Empty text is permitted. Acceptance does not prove application completion. Use an application-specific observable handshake before relying on output; [`"capture_pane"`](/en/perl/latest/reference/libtmux-server-capture_pane/) reads observed terminal content.

Returns `undef` after command acceptance. Performs I/O; failures propagate through [`LibTmux::X`](/en/perl/latest/reference/libtmux-x/). Captured objects are not modified.


```perl
    $server->send_text(pane => $pane, text => 'hello', enter => true);
```

## Methods

## Parameters

- `args`

## tmux command

The tmux commands behind `send_text`.

- [`display-message`](/en/tmux/latest/manual/display-message/) (daemon identity or target preflight)
- [`send-keys`](/en/tmux/latest/manual/send-keys/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_display_message_entry`](/en/tmux/latest/reference/c-variable-cmd_display_message_entry/) (attribute)
- [`cmd_display_message_exec`](/en/tmux/latest/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function)
- [`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)
