# window.Window.activePane

- **Module:** window.Window
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/window.ts#L144
- **Page:** https://libtmux.org/reference/ts/window-window-activepane/

```
window.Window.activePane() -> Pane | undefined
```

The pane tmux marks active in this window.

`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.

## Example

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