8000 Right-click in a terminal pane does nothing — it should copy the selection / paste the clipboard · Issue #336 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Right-click in a terminal pane does nothing — it should copy the selection / paste the clipboard #336

Closed

Description

@SriSatyaLokesh

What are you trying to do?

Paste a command into a terminal pane with the mouse. Right-click is the clipboard gesture on every Windows console — conhost with QuickEdit, Windows Terminal, PuTTY, mintty — and on GNOME Terminal, Konsole and iTerm2 too.

In wmux the gesture is inert: no contextmenu handler is attached to the xterm container and Electron shows no default menu, so right-click does nothing at all. Ctrl+V / Ctrl+Shift+V are the only way to paste.

What would you like wmux to do?

Right-click in a terminal pane copies the selection if there is one, otherwise pastes — Windows Terminal's default, and already wha 89E5 t wmux's own Ctrl+C does with a selection.

Two things that matter for it not to be annoying:

  • An app that turned on mouse tracking (vim with :set mouse=a, tmux, htop, opencode) should keep the click — xterm has already sent it the button report on mousedown, and pasting on top of that types the clipboard into an app that just acted on the click.
  • Shift + right-click is the bypass every terminal uses, and it is free here: xterm's shouldForceSelection is shiftKey, so with Shift held no report is sent.

Paste should go through the existing remote.resolvePaste → applyInsertion path rather than a second one, so bracketed paste, image/file paste and the scp upload for an ssh pane (#195) all apply to the gesture too.

A setting under Settings → Terminal for people who want always paste or do nothing instead.

What do you do today instead?

Ctrl+V, or Ctrl+Shift+V. Right-click is muscle memory from every other terminal, so it gets tried first and silently does nothing.

Activity

  1. SriSatyaLokesh commented on Oct 23, 2026

    @SriSatyaLokesh
    ContributorAuthor

    Opened #338 for this: right-click copies the selection if there is one and otherwise pastes (Windows Terminal's default), a mouse-tracking app keeps the click unless Shift is held, and paste reuses the Ctrl+V resolver so bracketed paste, image/file paste and the ssh scp upload all apply. Configurable under Settings → Terminal → Mouse (copy-or-paste / always paste / off).

    Note for ordering: #338 touches the same regions of en.ts, settings-slice.ts, TerminalSettings.tsx and useTerminal.ts as #337, so whichever lands second needs a keep-both resolution — or I can rebase #338 on top of #337.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0