Skip to content

Shift-insert should insert the PRIMARY clipboard on Linux, not the CLIPBOARD clipboard #36170

Closed

Description

@danvk
  • VSCode Version:

Version 1.16.1
Commit 27492b6
Date 2017-09-14T16:26:20.018Z
Shell 1.7.3
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Steps to Reproduce:

  1. Select some text with the mouse. This puts it in the PRIMARY clipboard.
  2. Press Shift+Insert.

In well-behaved Linux applications, this will paste in the text you just selected. In vscode, however, it pastes in the text in the CLIPBOARD clipboard. To insert the text in the PRIMARY clipboard, you must precisely position the mouse cursor and middle-click.

https://wiki.archlinux.org/index.php/clipboard

Reproduces without extensions: Yes/No

Activity

  1. added
    editor-clipboard
    on Oct 12, 2017
  2. added
    linux
    on Oct 13, 2017
  3. tobia commented on Oct 23, 2017

    @tobia

    +1, I miss this feature too.

    To play the devil's advocate, "well-behaved Linux applications" are far and between nowadays.

    Most applications, including all modern GTK apps and browsers, consider Shift+Insert as equivalent to Ctrl+V, probably to cater to Windows people who are used to that shortcut and are not accustomed to the concept of a dual clipboard.

    That being said, terminal emulators and traditional Linux programs do make the distinction and developers and hackers make regular use of it.

    As a comparison, Sublime Text has the same (broken) behavior by default (Shift+Ins = Ctrl+V) but allows changing it through the keybindings:

    {"keys": ["shift+insert"], "command": "paste", "args": {"clipboard": "selection"}},
    
  4. danvk commented on Oct 23, 2017

    @danvk
    Author

    Regardless of what the correct behavior is, I'd like to have an editor action for "paste primary clipboard" so that I can configure this myself.

  5. added
    help wanted
    on Oct 28, 2017
  6. added this to the Backlog milestone on Oct 28, 2017
  7. added
    feature-request
    on Jan 2, 2018
  8. perlun commented on Sep 10, 2018

    @perlun

    FWIW - IntelliJ also has the same (broken and incorrect) behavior but can easily be dressed to act differently:

    image

    Note the difference between the "Paste" and "Paste from X Clipboard" actions; the latter is the missing functionality in VS Code at the moment.

  9. removed their assignment
    on Sep 18, 2018
  10. perlun commented on Oct 4, 2018

    @perlun

    Daniel Imms (@Tyriar) Peng Lyu (@rebornix) Any updates on this? It's really frustrating to not be able to paste from the primary selection with keyboard. Right now, I have "solved" this by binding Shift-Insert to /usr/bin/xdotool click 2 in my GNOME settings, but the problem with that approach is that it will paste the content where the mouse cursor is located - not where the text cursor is located. So, a hack that doesn't fully work... 😢

  11. 7 remaining items

  12. perlun commented on Nov 19, 2018

    @perlun

    Edit: Middle-click seems to work out of the box?

    Middle-click works now already, yes, in the stable version of vscode.

  13. sameer commented on Nov 19, 2018

    @sameer
    Contributor

    Edit: Middle-click seems to work out of the box?

    Middle-click works now already, yes, in the stable version of vscode.

    Good to hear -- I have a touchpad and it works when I click both left and right at the same time, wasn't sure about middle-click for mouse users.

  14. tobia commented on Nov 18, 2019

    @tobia

    Thank you Sameer Puri (@sameer) for your contribution.

    Today marks 1 year since the pull request was submitted. Which animal do you think we need to sacrifice for this request to be considered?

  15. sameer commented on Nov 19, 2019

    @sameer
    Contributor

    There are some conflicts to resolve before merging since it's been so long, I will get to those hopefully sometime this week. Once I've done those I will ask for a review again.

    Edit: PR is ready

  16. added 2 commits that reference this issue on Nov 19, 2019
    5a4b851
    2e93b57
  17. added a commit that references this issue on Jan 14, 2020
    2d1e215
  18. added
    verification-needed
    on Jan 28, 2020
  19. added
    verified
    on Jan 29, 2020
  20. locked and limited conversation to collaborators on Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-clipboardfeature-requesthelp wantedlinuxverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions