Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cinnamon-msft opened this issue Mar 30, 2020 · 6 comments · Fixed by #5217
Closed

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

cinnamon-msft opened this issue Mar 30, 2020 · 6 comments · Fixed by #5217
Assignees
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@cinnamon-msft
Copy link
Contributor

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)

@cinnamon-msft cinnamon-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Mar 30, 2020
@cinnamon-msft cinnamon-msft added this to the Terminal v1.0 milestone Mar 30, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 30, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 30, 2020
@carlos-zamora carlos-zamora self-assigned this Apr 1, 2020
@ghost ghost added the In-PR This issue has a related PR label Apr 2, 2020
@ghost ghost closed this as completed in #5217 Apr 9, 2020
@ghost ghost removed the In-PR This issue has a related PR label Apr 9, 2020
ghost pushed a commit that referenced this issue Apr 9, 2020
## Summary of the Pull Request
Add comments and settings to settings.json for discoverability.

## PR Checklist
* [X] Closes #5187 
* [X] Closes #5188 
* [X] Closes #3058
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Apr 9, 2020
@ghost
Copy link

ghost commented Apr 22, 2020

🎉This issue was addressed in #5217, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.:tada:

Handy links:

@levicki
Copy link

levicki commented May 12, 2021

@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.

@zadjii-msft
Copy link
Member

@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!

@levicki
Copy link

levicki commented May 12, 2021

@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.

@DHowett
Copy link
Member

DHowett commented May 12, 2021

@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 😄

@levicki
Copy link

levicki commented May 13, 2021

@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.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants