[PR #9163] [MERGED] Do not dismiss selection if the Windows keys is pressed as a key-combination #27454

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9163
Author: @imaginary-person
Created: 2/14/2021
Status: Merged
Merged: 2/17/2021
Merged by: @undefined

Base: mainHead: win-button-do-not-dismiss-selection


📝 Commits (6)

  • 63ee402 Get changes from main repo
  • 91e4b09 Don't dismiss selection if Windows key was also pressed
  • 6fa834f Remove trailing whitespace
  • d3c0d55 Clear whitespace in empty line
  • 5633513 Revise code for better abstraction & readability
  • 26b51c4 Add 'const' keyword to 'window'

📊 Changes

1 file changed (+13 additions, -3 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+13 -3)

📄 Description

Aims to fix #8791.

Summary of the Pull Request

Prior to this PR, if the Windows key was pressed as a part of a key combination, then selection was being dismissed. For example, when a user pressed Windows + Shift + S keys to invoke the Capture & Annotate tool.
This PR adds an exception for not clearing selection when either of the two Windows keys are pressed as part of a key combination.
It was tested manually by trying to reproduce the issue.

PR Checklist

  • Closes add auto completation! (#8791)
  • [x ] CLA signed.
  • [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: #8791

Validation Steps Performed

  1. Build Terminal.
  2. Write anything & make a selection.
  3. Press Windows+ Shift + S keys.
  4. The Capture & Annotate tool appears but the selection made in step 2 isn't dismissed (doesn't disappear).

🔄 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/9163 **Author:** [@imaginary-person](https://github.com/imaginary-person) **Created:** 2/14/2021 **Status:** ✅ Merged **Merged:** 2/17/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `win-button-do-not-dismiss-selection` --- ### 📝 Commits (6) - [`63ee402`](https://github.com/microsoft/terminal/commit/63ee40247552575cf3327c5a4f02fe7794bada57) Get changes from main repo - [`91e4b09`](https://github.com/microsoft/terminal/commit/91e4b09d3b28dafacff82d34b79aa1a87c09ba87) Don't dismiss selection if Windows key was also pressed - [`6fa834f`](https://github.com/microsoft/terminal/commit/6fa834fd8fa9275f6ad61b84951e7f24111bc048) Remove trailing whitespace - [`d3c0d55`](https://github.com/microsoft/terminal/commit/d3c0d55aa5f13ca4e04d17e53c373ed6ec755a21) Clear whitespace in empty line - [`5633513`](https://github.com/microsoft/terminal/commit/5633513d4f0b4e96e33b6546588cc8f5ebe417fd) Revise code for better abstraction & readability - [`26b51c4`](https://github.com/microsoft/terminal/commit/26b51c4f6e7ae72fa1df65ed4d46049413504105) Add 'const' keyword to 'window' ### 📊 Changes **1 file changed** (+13 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+13 -3) </details> ### 📄 Description Aims to fix #8791. <!-- 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 Prior to this PR, if the Windows key was pressed as a part of a key combination, then selection was being dismissed. For example, when a user pressed `Windows` + `Shift` + `S` keys to invoke the _Capture & Annotate_ tool. This PR adds an exception for not clearing selection when either of the two Windows keys are pressed as part of a key combination. It was tested manually by trying to reproduce the issue. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #8791 * [x ] CLA signed. * [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: #8791 <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Build Terminal. 2. Write anything & make a selection. 3. Press `Windows`+ `Shift` + `S` keys. 4. The _Capture & Annotate_ tool appears but the selection made in step 2 isn't dismissed (doesn't disappear). --- <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:22:04 +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#27454