Pager content cannot be selected or copied
Description
In DeepSeek-TUI, the pager overlay is used to display detailed information, including:
- Alt+V: tool details — full input/output of tool calls
- Ctrl+O: thinking/reasoning content
lkey: full content of the last messagevkey: details of the selected entry
All of these pager views share a common usability problem: text cannot be selected or copied.
Specifically:
- Mouse selection does not work. Even though the terminal emulator supports text selection (e.g. Windows Terminal, iTerm2, Kitty, Alacritty all allow selecting text by holding Shift or using native selection mode), the TUI captures mouse events while the pager is open, making it impossible to drag-select any text.
- No keyboard shortcut to copy selected content.
Users have to close the pager (press q or Esc) and search for the same content in the transcript. However, the transcript often truncates or collapses long content (especially tool output and thinking blocks), making the needed text invisible or impossible to copy in full.
Mitigation
PR #1353 added a y (yank) keybinding to the pager that copies the entire content to the clipboard. This partially addresses the issue but has clear limitations:
yonly copies the full text — there is no way to copy a specific section- For pagers with large amounts of information (e.g. a tool detail with full input and output), the user may only want a particular paragraph, not the entire content
Remaining gap
The pager lacks mouse selection / text selection support, which is the root problem. An ideal solution should allow users to select and copy partial text within the pager, for example:
- Enable mouse drag-to-select within the pager area (by passing mouse events through to the terminal, or releasing the TUI's mouse capture in the pager region)
- Provide a "selection mode" that allows keyboard-based text selection (similar to tmux copy mode)
- Allow users to write pager content to an external file via a shortcut and open it in an editor
Environment
- Terminal: Windows Terminal, iTerm2, Kitty, Alacritty, or any terminal with mouse selection support
- OS: Windows / macOS / Linux
- Mouse capture enabled (
use_mouse_captureistrue)
Relevant code
- Pager implementation:
crates/tui/src/tui/pager.rs - Alt+V / Ctrl+O triggers:
crates/tui/src/tui/ui.rs—open_tool_details_pager()andopen_thinking_pager() y(yank) keybinding:pager.rslines 310-314, emitsCopyToClipboardevent
Fixed in v0.8.27 (releasing shortly).
Both c (clipboard convention) and y (vim-yank convention) now copy the entire pager body to the system clipboard, with a status toast confirming success or failure. The footer hint surfaces the new keys:
q/Esc close j/k scroll Space page Ctrl+D/U half g/G top/bottom / search c copy
This works in every pager — Alt+V tool details, Ctrl+O thinking content, shell-job / task / MCP-manager pagers, and the Alt+V-on-selection variant.
Once v0.8.27 ships, please update with one of:
- npm:
npm install -g deepseek-tui@latest - brew:
brew upgrade deepseek-tui - cargo:
cargo install --force deepseek-tui-cli
Reopen if the keybinding doesn't work for your platform. Thanks for the report!