Skip to content

Add ctrl+c/ctrl+v to settings.json #5187

Closed

Description

Description of the new feature/enhancement

We should add copy and paste key bindings as ctrl+c/v in the settings.json file so people can see them and have the option to remove them.

Additionally, there should be a comment in the file explaining that ctrl+shift+c/v are still shipped by default so they have a backup key binding if they choose to remove the above bindings.

This would also close #3058

Proposed technical implementation details (optional)

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Area-SettingsIssues related to settings and customizability, for console or terminal
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on Mar 30, 2020
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Mar 30, 2020
  3. ghost added
    In-PRThis issue has a related PR
    on Apr 2, 2020
  4. ghost closed this as completedin #5217on Apr 9, 2020
  5. ghost removed
    In-PRThis issue has a related PR
    on Apr 9, 2020
  6. ghost added a commit that references this issue on Apr 9, 2020
    c65de31
  7. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Apr 9, 2020
  8. levicki commented on May 12, 2021

    @levicki

    Kayla Cinnamon (@cinnamon-msft) In Windows Terminal Version 1.7.1033.0 I don't have any keybindings in settings.json for copy and paste. Moreover, under Settings -> Actions, defaults are shown as copy being ctrl+insert, and paste being shift+insert.

    I might have had an existing settings json without keybindings before installing the Windows Terminal.

    From the bug reports here it is unclear to me what behavior is expected and what should the actual defaults for copy and paste be. I have the following questions:

    1. Was WT supposed to update the existing settings.json to add keybindings for copy and paste or at least add commented out example?
    2. Are copy and paste default bindings decided and if so what they are?
    3. I am aware of the challanges with ctrl+c and ctrl+v and that we cannot please everyone, but as a longtime Windows cmd.exe user and occasional Linux user, I would prefer if a core Windows application such as WT (which is seemingly supposed to replace the old conhost?) provides default Windows experience out of the box with the ability to change it to something else.
  9. zadjii-msft commented on May 12, 2021

    @zadjii-msft
    Member

    Igor Levicki (@levicki) Would you mind filing a new issue to track your problem? This issue's over a year old, and specifically was used to track adding ctrl+c/ctrl+v to the default settings.json file back in 2020. If you're not seeing those keybindings, then it's likely that you're running into something entirely else. Screenshots of the settings UI, and your entire settings.json file would be appreciated as well. Thanks!

  10. levicki commented on May 12, 2021

    @levicki

    Mike Griese (@zadjii-msft) I asked here intentionally because description of this fix does not reflect reality.

    It says:

    Additionally, there should be a comment in the file explaining that ctrl+shift+c/v are still shipped by default...

    My settings show different defaults when keybindings are empty.

    All I wanted is to be pointed to some place where current behavior is documented so I can determine whether I am having a problem or not before eventually submitting an issue.

  11. DHowett commented on May 12, 2021

    @DHowett
    Member

    Igor Levicki (@levicki) so, this is one of those annoying things we chose to do to preserve our userbase's sanity.

    We added the key bindings for people who first launch the terminal, or delete their settings, after 4/9/2020. It's part of the template settings file that is put on disk during startup if you don't already have settings.

    That template data is here-

    // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
    // These two lines additionally bind them to Ctrl+C and Ctrl+V.
    // To learn more about selection, visit https://aka.ms/terminal-selection
    { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
    { "command": "paste", "keys": "ctrl+v" },

    If we had added them to the set of default key bindings in the application settings (the immutable ones), all the users who had installed and launched Terminal before 4/9/2020 would have suddenly lost ctrl+c/ctrl+v as verbatims.

    We place a reasonably high value on not breaking existing users¹, so this was the compromise we came to.

    ¹ we have done this before, and it tastes bad. Especially considering the input service discussion 😄

  12. levicki commented on May 13, 2021

    @levicki

    Dustin L. Howett (@DHowett) Thanks for clarifying that part and linking to the template.

    Frankly, I was expecting from a Windows application that ctrl+c and ctrl+v are the built-in defaults for copy and paste even in the absence of keybindings in settings.json (of course with the ability to override them), but the graphical settings page is showing different defaults which also differ from the ones mentioned here. I sincerely doubt many Windows users know about and use those other key combos.

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

Metadata

Metadata

Labels

Area-SettingsIssues related to settings and customizability, for console or terminalIssue-BugIt either shouldn't be doing this or needs an investigation.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions