# LibTmux::Pane#copy_mode

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/da7b6191b9439e3c84fa1c9eeaa9168263ee7af4/gems/libtmux/lib/libtmux/operations.rb#L403
- **Page:** https://libtmux.org/en/ruby/v0.1.1/reference/libtmux-pane-copy_mode/

```
def copy_mode: (
  ?scroll_up: bool,
  ?exit_on_bottom: bool,
  ?mouse_drag: bool,
  ?cancel_mode: bool,
  ?page_down: bool,
  ?source: ::LibTmux::EntityRef?,
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

Behavior: Copy mode.

Behavior contract: Copy mode.

## Parameters

- `scroll_up` (`bool`)
- `exit_on_bottom` (`bool`)
- `mouse_drag` (`bool`)
- `cancel_mode` (`bool`)
- `page_down` (`bool`)
- `source` (`::LibTmux::EntityRef?`)
- `timeout` (`::Numeric`)
- `cancel` (`untyped`)

## tmux command

The tmux commands behind `copy_mode`.

- [`copy-mode`](/en/tmux/latest/manual/copy-mode/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_copy_mode_entry`](/en/tmux/latest/reference/c-variable-cmd_copy_mode_entry/) (attribute)
- [`cmd_copy_mode_exec`](/en/tmux/latest/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function)

## In other ports

Put a pane into copy mode

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.copy_mode`](/en/py/latest/reference/libtmux-pane-copy_mode/) (method) |
| Lua | [`libtmux.Pane:copy_mode`](/en/lua/latest/reference/libtmux-pane-copy_mode/) (method) |
| TypeScript | [`pane.Pane.enterCopyMode`](/en/ts/latest/reference/pane-pane-entercopymode/) (method) |
| Rust | [`pane.Pane.copy_mode`](/en/rs/latest/reference/pane-pane-copy_mode/) (method) |
| Go | [`tmux.Pane.CopyMode`](/en/go/latest/reference/tmux-pane-copymode/) (method) |
| Java | [`io.github.libtmux.Pane.copyMode`](/en/java/latest/reference/io-github-libtmux-pane-pane-copymode/) (method) |
| C# | [`LibTmux.Pane.EnterCopyModeAsync`](/en/csharp/latest/reference/libtmux-pane-entercopymodeasync/) (method) |
| C++ | [`libtmux::Pane::enter_copy_mode`](/en/cxx/latest/reference/libtmux-pane-enter_copy_mode/) (method) |
| Swift | no equivalent on `Pane` |

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