# LibTmux.SendKeysRequest.ToCommands

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Requests/SendKeysRequest.cs#L72
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-sendkeysrequest-tocommands/

```
LibTmux.SendKeysRequest.ToCommands(pane: Pane) -> IReadOnlyList<TmuxCommand>
```

Returns every command the key request sends, in order.

Enter uses a separate command so literal mode types the text and then presses the key.

## Parameters

- `pane` (`Pane`): The pane that receives the keys.

## Returns

The text command followed by Enter when requested.

## Raises

- [`ArgumentNullException`](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): <paramref name="pane" /> is null.
- [`ArgumentException`](https://learn.microsoft.com/dotnet/api/system.argumentexception): The request sends nothing or its text contains NUL.
