[PR #1093] [MERGED] Connect clipboard functionality to their keybindings #24480

Open
opened 2026-01-31 09:03:32 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1093
Author: @d-bingham
Created: 6/1/2019
Status: Merged
Merged: 6/25/2019
Merged by: @cinnamon-msft

Base: masterHead: connect-clipboard-keybindings


📝 Commits (10+)

  • d4a4a24 Connects clipboard functionality to their keybindings.
  • a0d004a Cleaning up comments and whitespace.
  • e6bbc86 Added "copyTextWithoutNewlines" keybinding.
  • fb1052c Fixing tabs in idl file
  • 908b1e9 Merging forked branch
  • 1d79dbc Fixing merge conflicts
  • 41d8e4e Adding default keybindings for copy and paste to ctrl-shift-c and ctrl-shift-v, respectively.
  • 4f89f0c Synchronizing fork
  • 6d3a6d9 Complying with refactoring
  • fd7f155 Merge remote-tracking branch 'upstream/master' into connect-clipboard-keybindings

📊 Changes

9 files changed (+45 additions, -9 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.cpp (+10 -0)
📝 src/cascadia/TerminalApp/App.h (+2 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.cpp (+4 -1)
📝 src/cascadia/TerminalApp/AppKeyBindings.idl (+2 -1)
📝 src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp (+2 -0)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+9 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+14 -7)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+1 -0)

📄 Description

Summary of the Pull Request

Connects copy and paste keybindings to the appropriate clipboard functionality within Terminal.

References

#1072, #968

PR Checklist

  • Closes Forms of communication between developers?(Discord/Teams/Slack/Email) (#968)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #1072, #968 his connects the (mostly) pre-existing copy/paste mechanics to the keyboard shortcut mechanics.

Detailed Description of the Pull Request / Additional comments

Changes:

  • Added TermControl::PasteTextFromClipboard which does what it says on the tin. Refactored the paste code from the right-click handling in TermControl here.
  • Added App::_PasteText, mirroring the pre-existing App::_CopyText
  • Added connections from keybindings to copy/paste functionality in App::_HookupKeyBindings

Notes:

  • This PR interprets the keybinding "copy" as a copy trimming trailing whitespace (the operation performed by a right-click with a selection active). It may be appropriate to add a keybinding for a whitespace-preserving copy (which is now done as a shift-right-click with a selection active).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1093 **Author:** [@d-bingham](https://github.com/d-bingham) **Created:** 6/1/2019 **Status:** ✅ Merged **Merged:** 6/25/2019 **Merged by:** [@cinnamon-msft](https://github.com/cinnamon-msft) **Base:** `master` ← **Head:** `connect-clipboard-keybindings` --- ### 📝 Commits (10+) - [`d4a4a24`](https://github.com/microsoft/terminal/commit/d4a4a24d0dd2db45a16607b3d2c7c4ca88ec7be1) Connects clipboard functionality to their keybindings. - [`a0d004a`](https://github.com/microsoft/terminal/commit/a0d004ae5aa1a216f1f938d86ccafb017a66435e) Cleaning up comments and whitespace. - [`e6bbc86`](https://github.com/microsoft/terminal/commit/e6bbc8610f7df85e8795c68c1b971c72558504df) Added "copyTextWithoutNewlines" keybinding. - [`fb1052c`](https://github.com/microsoft/terminal/commit/fb1052c37a376a035d202d735390159980d17ea3) Fixing tabs in idl file - [`908b1e9`](https://github.com/microsoft/terminal/commit/908b1e9218cbea5192d6565cb27a75164d240603) Merging forked branch - [`1d79dbc`](https://github.com/microsoft/terminal/commit/1d79dbc6d02486456a756623c2f4f375b3dfa36d) Fixing merge conflicts - [`41d8e4e`](https://github.com/microsoft/terminal/commit/41d8e4e31d91b29f30106c874c2eb01bf5e891fb) Adding default keybindings for copy and paste to ctrl-shift-c and ctrl-shift-v, respectively. - [`4f89f0c`](https://github.com/microsoft/terminal/commit/4f89f0c9662cf4fc05ce3c9eef148db9355cbecd) Synchronizing fork - [`6d3a6d9`](https://github.com/microsoft/terminal/commit/6d3a6d96c6265c96f7f76296778fa695fe74d8a0) Complying with refactoring - [`fd7f155`](https://github.com/microsoft/terminal/commit/fd7f1557119bae65968851bfc406fbe1166415eb) Merge remote-tracking branch 'upstream/master' into connect-clipboard-keybindings ### 📊 Changes **9 files changed** (+45 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.cpp` (+10 -0) 📝 `src/cascadia/TerminalApp/App.h` (+2 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.cpp` (+4 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindings.idl` (+2 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp` (+2 -0) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+9 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+14 -7) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+1 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Connects copy and paste keybindings to the appropriate clipboard functionality within Terminal. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #1072, #968 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #968 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #1072, #968 his connects the (mostly) pre-existing copy/paste mechanics to the keyboard shortcut mechanics. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Changes: - Added TermControl::PasteTextFromClipboard which does what it says on the tin. Refactored the paste code from the right-click handling in TermControl here. - Added App::_PasteText, mirroring the pre-existing App::_CopyText - Added connections from keybindings to copy/paste functionality in App::_HookupKeyBindings Notes: - This PR interprets the keybinding "copy" as a copy trimming trailing whitespace (the operation performed by a right-click with a selection active). It may be appropriate to add a keybinding for a whitespace-preserving copy (which is now done as a shift-right-click with a selection active). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:03:32 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24480