# LibTmux.Window.SelectLastPaneAsync

- **Module:** LibTmux.Window
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Window.Panes.cs#L35
- **Page:** https://libtmux.org/reference/dotnet/libtmux-window-selectlastpaneasync/

```
LibTmux.Window.SelectLastPaneAsync(inputMode: PaneInputMode?, keepZoom: bool, cancellationToken: CancellationToken) -> Task<Pane?>
```

Selects the pane that was last active.

Asking for an input change makes tmux apply that to the last pane and
leave the active pane alone, so the handle that comes back is the pane
that was already active.

## Parameters

- `inputMode` (PaneInputMode?) — Whether to change the pane's input handling instead.
- `keepZoom` (bool) — Whether a zoomed pane stays zoomed.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

The pane that is active afterwards, or null when none is.
