Mouse and copy
Focus and resize panes, scroll history, and copy text through OSC 52 with koshi's mouse controls.
Mouse support covers pane focus, border resize, scrollback, selection, and
clipboard copy. The mouse belongs to the terminal you are sitting at, so every
setting on this page is read from that terminal's own koshi.kdl.
Focus and resize
Click a pane to focus it. Drag a pane border to resize the panes on either side. A drag moves the border the whole distance in one step, so the layout follows the pointer instead of trailing it a cell at a time.
Disable border dragging in koshi.kdl:
version 1
mouse {
border-resize #false
}Scrollback
The wheel scrolls koshi's per-pane history by three lines per notch by default.
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. That one is read by the session, so it is the same for every
attached terminal.
Select when an app owns the mouse
Full-screen terminal programs can request mouse input. Press <C-g> to toggle mouse-selection mode for the current client. While enabled, a drag selects terminal text in koshi instead of going to the program.
koshi actions explain core:mouse-selectHold Shift while dragging to select text even when the program owns mouse
input. This does not enter mouse-selection mode.
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. The copy is made where the selection was dragged, so it is that
terminal's copy settings that apply.
Trailing blanks are removed from copied lines by default:
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.