# session.Session.activePane

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

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

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

This is two hops rather than one because [`pane_active`](/en/tmux/latest/catalog/formats/pane_active/) is per window: every
window has an active pane, and only the active window's is the session's.

## Examples

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

## In other ports

The active pane of a session's active window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.active_pane`](/en/py/latest/reference/libtmux-session-active_pane/) (property) |
| Ruby | [`LibTmux::WindowSnapshot#active_pane`](/en/ruby/latest/reference/libtmux-windowsnapshot-active_pane/) (method) |
| Rust | no equivalent on `Session` |
| Go | [`tmux.Session.ActivePane`](/en/go/latest/reference/tmux-session-activepane/) (method) |
| Java | [`io.github.libtmux.Session.activePane`](/en/java/latest/reference/io-github-libtmux-session-session-activepane/) (method) |
| C# | [`LibTmux.Session.ActivePane`](/en/csharp/latest/reference/libtmux-session-activepane/) (property) |
| C++ | [`libtmux::Session::active_pane`](/en/cxx/latest/reference/libtmux-session-active_pane/) (method) |
| Swift | no equivalent on `Session` |

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