# Mouse and copy (/docs/v0.1/using/mouse-and-copy)



Mouse support covers pane focus, border resize, scrollback, selection, and
clipboard copy.

## Focus and resize [#focus-and-resize]

Click a pane to focus it. Drag a pane border to resize the panes on either side.
Disable border dragging in `koshi.kdl`:

```kdl
version 1

mouse {
    border-resize #false
}
```

## Scrollback [#scrollback]

The wheel scrolls koshi's per-pane history by three lines per notch by default.

```kdl
version 1

mouse {
    scroll-lines 5
    wheel "scroll-scrollback"
}
```

Set `wheel "ignore"` to leave wheel input unused by koshi.

Typing while scrolled up returns to the newest line by default. Set
`scrollback.scroll-on-input #false` to keep the view parked while input still
reaches the pane.

## Select when an app owns the mouse [#select-when-an-app-owns-the-mouse]

Full-screen terminal programs can request mouse input. Press
<kbd>\<C-g></kbd> to toggle mouse-selection mode for the current client.
While enabled, a drag selects terminal text in koshi instead of going to the
program.

```bash
koshi actions explain core:mouse-select
```

## Copy [#copy]

Completing a selection copies through OSC 52. OSC 52 asks the outer terminal
to write the clipboard, so copying also works through SSH when that terminal
allows it.

Trailing blanks are removed from copied lines by default:

```kdl
version 1

copy {
    trim-trailing-whitespace #true
}
```

Clipboard policy belongs to the outer terminal. If selection works but the
clipboard stays unchanged, check that terminal's OSC 52 setting.
