Skip to content

Support copy and paste via keyboard on integrated terminal #6451

Closed

Description

@Tyriar

Integrated terminal master issue: #143

Might need to use custom keybindings, ctrl+c terminates a process. Also it's probably not best to hijack ctrl+shift+c from open in new terminal.

Activity

  1. added
    feature-request
    terminal
    on May 18, 2016
  2. added this to the June 2016 milestone on Jun 7, 2016
  3. Tyriar commented on Jun 7, 2016

    @Tyriar
    ContributorAuthor

    Probably best left for after xterm is adopted.

  4. Tyriar commented on Jun 13, 2016

    @Tyriar
    ContributorAuthor

    Upstream issue blocking configurable copy/paste: xtermjs/xterm.js#118

    xterm.js did recently add ctrl+insert to copy and shift+insert to paste in xtermjs/xterm.js#107, so this will be the 'workaround' until xtermjs/xterm.js#118 gets done.

  5. mniak commented on Jun 22, 2016

    @mniak

    I'm also facing Issues with ctrl+C and other simmilar copy-paste shortcuts in the integrated terminal on Windows. I'm not sure what would be the best solution to this issue. Some people would enjoy copying and pasting using the default OS keyboard shortcuts, but it would be difficult to break a current running process (except for OS X). I strongly use this shortcut.

    I'd rather remove the shortcut indicator in the right-button-menu for copy/paste/cut to avoid misunderstandings.

  6. Tyriar commented on Jun 27, 2016

    @Tyriar
    ContributorAuthor

    Basic support is there for v1.3.0 using:

    • ctrl+insert to copy
    • shift+insert to paste

    This will be improved in the future with the ability to specify your preference in keybindings.json.

  7. bldesign commented on Jul 5, 2016

    @bldesign

    Maybe integrated terminal can present same feature as native Windows terminal, on Windows.

    In the property options there are edition options with the ability to active ctrl shortcuts. It's just what we are talking about. It kills the process only if there is no selection. Cool no? VS Code can do it.

    Sorry my preview is in french, but yours certainly looks the same.
    terminalpropertiesoptions

    With all options enabled. You can:

    1. Copy paste ctrl + c / v even when a process is running (kills only if no selection)
    2. Always paste ctrl + v (after process ended)
    3. Select text with mouse
    4. Select text with keyboard shift + ← / →

    You can copy, paste and select text only with keyboard on Windows.
    (Both terminal, integrated and not are Microsoft Windows [version 10.0.10586])

    Can you expose these options to user preferences?

  8. added
    linux
    windows
    on Jul 5, 2016
  9. mniak commented on Jul 6, 2016

    @mniak

    Killing the process only if there is no selection

    A very good idea

  10. Tyriar commented on Jul 6, 2016

    @Tyriar
    ContributorAuthor

    bldesign (@bldesign) andregsilv nice suggestion, forked to #8818 to be considered after this.

  11. 2 remaining items

  12. Tyriar commented on Jul 11, 2016

    @Tyriar
    ContributorAuthor

    Reopening as these keybindings should be disabled on Mac since cmd+c and cmd+v work there.

  13. added a commit that references this issue on Jul 12, 2016
    ab0f9ed
  14. alexsorokoletov commented on Jul 13, 2016

    @alexsorokoletov

    unfortunately ctrl+insert/shift+insert is not the ideal way to have shortcuts on windows. Macbooks don't have insert key.

  15. Tyriar commented on Jul 13, 2016

    @Tyriar
    ContributorAuthor

    Alex Sorokoletov (@alexsorokoletov) cmd+c and cmd+v should work on Mac.

  16. alexsorokoletov commented on Jul 16, 2016

    @alexsorokoletov

    Daniel Imms (@Tyriar) hardware is mac, however the OS is Windows 10. Sorry for the confusion

  17. Tyriar commented on Jul 16, 2016

    @Tyriar
    ContributorAuthor

    Alex Sorokoletov (@alexsorokoletov) ah, I guess you have to wait until next release then or use the Insiders build for ctrl+shift+c/v.

  18. superDuperCyberTechno commented on Aug 7, 2016

    @superDuperCyberTechno

    So, it has been implemented, although I cannot seem to change the shortcut. I tried switching it to ctrl+c/ctrl+v without luck. All other custom keybindings work fine.

  19. Tyriar commented on Aug 8, 2016

    @Tyriar
    ContributorAuthor

    superDuperCyberTechno you can change the keybinding, but you can only change it to certain combinations as the key strokes at handled by the terminal before vscode itself. This is the reason F1 and ctrl+p do no work but ctrl+shift+p works fine. The "fix" for this would be to address #7269 (comment)

  20. superDuperCyberTechno commented on Aug 8, 2016

    @superDuperCyberTechno

    Alright, thank you for the explanation. Makes sense that ctrl+c is bound to the cancel action in the console (bash, at least). I'll just stick to the default keybinding for now, then...

  21. Tyriar commented on Aug 8, 2016

    @Tyriar
    ContributorAuthor

    superDuperCyberTechno I just pushed a fix for #7269 which will landin Insiders tomorrow (or v1.5.0 stable) to allow a set of commands to skip over the shell processing and be handled by VS Code. This means that you can indeed rebind to ctrl+c and ctrl+v if you want, you will not be able to use ctrl+c to cancel the command anymore though and you cannot remap that (outside of maybe remapping in bash if that's possible).

    Conditional ctrl+c/v if probably what you really want, this is still open and captured in #8818

  22. locked and limited conversation to collaborators on Nov 18, 2017
  23. added 2 commits that reference this issue on Sep 6, 2026
    8f40ad8
    45b95d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestlinuxterminalwindows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions