# libtmux.Pane.copy_mode

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L1978
- **Page:** https://libtmux.org/reference/py/libtmux-pane-copy_mode/

```
libtmux.Pane.copy_mode(self, scroll_up: bool | None = None, exit_on_bottom: bool | None = None, mouse_drag: bool | None = None, cancel: bool | None = None, page_down: bool | None = None, source_pane: str | None = None) -> None
```

Enter copy mode via ``$ tmux copy-mode``.

## Parameters

- `self`
- `scroll_up` (bool | None) — Start scrolled up one page (``-u`` flag).
- `exit_on_bottom` (bool | None) — Exit copy mode when scrolling reaches the bottom of the
history (``-e`` flag).
- `mouse_drag` (bool | None) — Start mouse drag (``-M`` flag).
- `cancel` (bool | None) — Cancel copy mode and any other modes (``-q`` flag).
- `page_down` (bool | None) — Scroll a page down if already in copy mode (``-d`` flag).
Requires tmux 3.5+.
- `source_pane` (str | None) — Source pane whose contents should be displayed in copy
mode (``-s`` flag). Lets you scroll/copy from another
pane's history. Requires tmux 3.2+.

## Example

```python
>>> pane.copy_mode()
```
