#3928·lapce

Terminal: right-click should paste when there is no selection (currently only copies on selection)

Author: sunamoCreated Aug 19, 2026Updated Aug 19, 2026

Current behavior

In the integrated terminal panel, right-click already has partial copy/paste-style behavior (lapce-app/src/terminal/view.rs, MouseAction::RightOnce handling in the PointerUp branch around the SystemClipboard usage):

  • Right-click on top of an existing selection → copies the selected text to the clipboard. This works.
  • Right-click when there is no selection → does nothing (falls through to just clear_selection = true, no paste is triggered).

There's also no middle-click (PointerButton::Auxiliary) paste handling anywhere in that file.

Requested behavior

This is the common terminal-emulator convention (e.g. Windows Console/ConEmu, PuTTY, many Linux terminals):

  • Right-click with an active selection → copy selection to clipboard (already implemented).
  • Right-click with no selection → paste clipboard contents into the terminal (not implemented).

Why

Ctrl+V is intentionally not bound to paste while focus is in the terminal (terminal mode "t" uses Ctrl+Shift+V instead, presumably to avoid clashing with programs running inside the terminal that use Ctrl+V/Ctrl+C themselves). That's a reasonable default, but it means the only paste path in the terminal today is the Ctrl+Shift+V keybinding — there's no mouse-based paste at all. Adding "right-click pastes when nothing is selected" would match the muscle memory a lot of users already have from other terminal apps, without touching the existing Ctrl+Shift+V keybinding or the existing "right-click copies a selection" behavior.

Where to look

lapce-app/src/terminal/view.rs, the Event::PointerUp handler, MouseAction::RightOnce { pos } arm — currently only copies when selection.contains(position); there's no else branch that calls into the paste path (the same one clipboard_paste / Ctrl+Shift+V uses).