# session.Session.activePane

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

```
session.Session.activePane() -> Pane | undefined
```

The pane tmux marks active in this session's active window.

This is two hops rather than one because `pane_active` is per window: every
window has an active pane, and only the active window's is the session's.

## Example

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