Skip to content

Conversation

marvinthepa
Copy link
Contributor

@marvinthepa marvinthepa commented Nov 7, 2021

This PR fixes no existing issue - but I can create a feature request if you want me to 😃 .

GUIs on UNIX-like systems using X11 (or Wayland) have two clipboards:

  • one that uses ctrl-c for copying and ctrl-v for pasting
  • one that copies selected text to the clipboard, and uses the middle-mouse button for pasting

If you are not on one of those platforms, the second one can be simulated by the application. It can be enabled in iterm2 on Mac OS, for example. The only limitation is that there is only one clipboard that is used for both types of copy/paste.

As vscode already supports half of it with the setting terminal.integrated.copyOnSelection, I thought it might make sense to also support the other half.

The configuration setting could be a boolean, but was made to look consistent to the existing terminal.integrated.rightClickBehavior.

Fixes #187365

@ghost
Copy link

ghost commented Nov 7, 2021

CLA assistant check
All CLA requirements met.

@Tyriar
Copy link
Member

Tyriar commented Nov 15, 2021

This has come up before and we decided not to go with it because of the extra complexity it brings mainly around settings clutter. The good news is this month we're looking into making mouse input customizable which this would fit with perfectly, let's reconsider after #3130, feel free to make an issue to track it.

@Tyriar Tyriar closed this Nov 15, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2021
@Tyriar
Copy link
Member

Tyriar commented Apr 2, 2024

Reopening for #187365 to see how difficult it is to update this branch.

@Tyriar Tyriar reopened this Apr 2, 2024
@Tyriar Tyriar modified the milestones: November 2021, April 2024 Apr 2, 2024
@Tyriar Tyriar requested a review from meganrogge April 2, 2024 14:01
@Tyriar Tyriar changed the title Middle-click paste in terminal on non-Linux Middle-click paste in terminal Apr 2, 2024
@Tyriar Tyriar enabled auto-merge April 2, 2024 14:01
@Tyriar Tyriar merged commit bd05f05 into microsoft:main Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make middle-click do copy-and-paste in integrated terminal
3 participants