# window.Window.activePane

- **Module:** window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/window.ts#L171
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-activepane/

```
activePane(): Pane | undefined
```

The pane tmux marks active in this window.

[`pane_active`](/en/tmux/latest/catalog/formats/pane_active/) is scoped to a window, so filtering a session's panes on it
yields one per window rather than one overall. Reaching the active pane
through the window it belongs to is what makes the answer singular.

## Examples

```ts
await window.activePane?.sendKeys("echo hello");
```

## Guides

Pages that discuss `activePane`.

- [Traversal](/en/ts/latest/topics/traversal/)

## In other ports

The window's active pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.active_pane`](/en/py/latest/reference/libtmux-window-active_pane/) (property) |
| Rust | [`window.Window.active_pane`](/en/rs/latest/reference/window-window-active_pane/) (method) |
| Go | [`tmux.Window.ActivePane`](/en/go/latest/reference/tmux-window-activepane/) (method) |
| Java | [`io.github.libtmux.Window.activePane`](/en/java/latest/reference/io-github-libtmux-window-window-activepane/) (method) |
| C# | [`LibTmux.Window.ActivePane`](/en/csharp/latest/reference/libtmux-window-activepane/) (property) |
| C++ | [`libtmux::Window::active_pane`](/en/cxx/latest/reference/libtmux-window-active_pane/) (method) |
| Swift | no accessor; `Pane.isActive` is a flag on the pane, so the active one is found by filtering a listing |

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
