Skip to content

CTRL + C & CTRL + V copy paste #602

Closed

Description

@JohanVandeplas

Is it possible to implement an option to set the Copy / Paste shortcuts to CTRL + C & CTRL + V (like any other application) instead of CTRL/SHIFT INS

Activity

  1. mintty commented on Oct 13, 2016

    @mintty
    Owner

    Duplicate #524, the name of the option is CtrlExchangeShift.
    And your annotation "like any other application" is not quite true (cf. #523 (comment)) because mintty is a terminal application and as such it needs to be able to provide all control characters to the application running in it, like any other terminal application.

  2. mintty commented on Nov 12, 2016

    @mintty
    Owner

    Fixed description in 2.7.0.

  3. jasonenglehart commented on Sep 18, 2017

    @jasonenglehart

    I'm sorry mintty, I have to agree with JohanVandeplas here. I had issue with lack of copy and paste without doing some work just to activate it. And I beleive JohanVandeplas was implying that most applications use the standard ctrl+ c and ctrl+v. It is realllllllly frustrating. I will look at how to get this done but now your right click copy, right click paste is bugging up.

  4. mintty commented on Sep 19, 2017

    @mintty
    Owner

    You haven't read my previous comment which would also be the response to yours.
    Particularly, let me point out again: A terminal application is not a typical Windows application, and Control keys are functional for a terminal, so you cannot just redefine them as meta functions without complication. Especially the request to exchange only the copy/paste keys creates an inconsistency.

    Having said this, and also checking related issues, I did not exclude such a feature completely. If you make a proposal how to configure it in a suitable way, that might be helpful.

  5. mintty commented on Sep 19, 2017

    @mintty
    Owner

    Actually, this is a duplicate of #645. You might add a "thumbs up" count there to promote the request.

  6. jasonenglehart commented on Sep 19, 2017

    @jasonenglehart

    You accuse me of too much. I have read the previous comments and have understood your reasonings. I'm really not sure why right click copy and right click paste only works half of the time. I just there was a more consistently successful way to copy/paste in and out of the mintty terminal. Some times when I paste it immediately executes my command line. And sometimes it does nothing

  7. jasonenglehart commented on Sep 19, 2017

    @jasonenglehart

    Pardon on the typo above. Let me correct here.
    "I WISH just there was a more consistently successful way to copy/paste in and out of the mintty terminal. "

  8. mintty commented on Sep 19, 2017

    @mintty
    Owner

    Now what about CtrlExchangeShift=yes, does it not achieve what you want?

    About clicks not working: this is a different issue, and I've never heard of such a problem. Could "sometimes/half of the time" mean in different contexts (like e.g. command line / editor)? Do you have "Enter" configured for either Right or Middle mouse button in Options - Mouse?

  9. k-takata commented on Sep 20, 2017

    @k-takata
    Contributor

    why right click copy and right click paste only works half of the time.

    Some applications (e.g. Vim with mouse enabled setting) handle mouse by their own.
    Shift + RightClick can show the mintty menu even in that case.

  10. mintty commented on Sep 26, 2017

    @mintty
    Owner

    While the original poster of this issue (JohanVandeplas) seems to be satisfied with CtrlExchangeShift,
    @jasonenglehart has not yet responded to my question whether that achieves what he wants, nor has he put a "thumbs-up" to issue #645. So I'm still hesitating whether (and how) to introduce this quirk for the upcoming next release.

  11. reopened this on Sep 26, 2017
  12. JohanVandeplas commented on Sep 26, 2017

    @JohanVandeplas
    Author

    Satisfied.. Well now I understand better why it's not so easy... And I'm ok with the provided solution.

    jasonenglehart mentioned inconsistency in whether or not commands are executed when pasting. I had that too but I figured it was just because I copied the return in the end..

  13. jasonenglehart commented on Sep 26, 2017

    @jasonenglehart

    Have to honest. I do not know what you mean by CtrlExchangeShift. I asked my other com sci buddies and they are confused to. I'm using an US Windows keyboard. Can you elaborate?

  14. mintty commented on Sep 26, 2017

    @mintty
    Owner

    Edit your mintty config file (typically $HOME/.minttyrc) with a text editor.
    Add the line

    CtrlExchangeShift=yes
    

    Then start a new mintty window.

    It's a "hidden setting", not in the GUI Options dialog, because I consider it exotic. That could be changed if desired (with other complications because the "Keys" section is already full, and it would be nice to keep the config dialog small...).

  15. mintty commented on Oct 23, 2017

    @mintty
    Owner

    As the answer to the original request "is it possible" is yes (CtrlExchangeShift), I'm closing this again.
    For the more specific request variant, see #645.

  16. added a commit that references this issue on Sep 2, 2018
  17. added a commit that references this issue on Sep 19, 2018
  18. mintty commented on Sep 20, 2018

    @mintty
    Owner

    Released 2.9.1.

  19. mintty commented on Mar 25, 2022

    @mintty
    Owner

    Released 3.6.0.

  20. jackusay commented on Nov 17, 2024

    @jackusay

    From a Google search:

    for Paste == Ctrl+V,

    add:

    ShootFoot=on
    KeyFunctions=C+v:paste
    

    in ~/.minttyrc

    manual

  21. BrianInglis commented on Nov 17, 2024

    @BrianInglis

    From above and mintty(1):

    Note: If both settings CtrlShiftShortcuts and CtrlExchangeShift are enabled, copy & paste functions are assigned to plain (unshifted) Ctrl+C and Ctrl+V for those who prefer them to be handled like in Windows.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions