[PR #5431] [MERGED] Send a Ctrl-C KeyUp event #26317

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5431
Author: @leonMSFT
Created: 4/20/2020
Status: Merged
Merged: 4/22/2020
Merged by: @undefined

Base: masterHead: dev/lelian/idontwantmybranchnametoberelevanttoday


📝 Commits (3)

  • 2495958 what comes down must come back up
  • 9a377ac also the test case
  • d781297 olol i switched the two vars

📊 Changes

2 files changed (+7 additions, -4 deletions)

View changed files

📝 src/terminal/adapter/InteractDispatch.cpp (+3 -2)
📝 src/terminal/parser/ut_parser/InputEngineTest.cpp (+4 -2)

📄 Description

Summary of the Pull Request

Users were not able to intercept Ctrl-C input using $Host.UI.RawUI.ReadKey("IncludeKeyUp"), because we weren't sending a Ctrl-C KeyUp event. This PR simply adds a KeyUp event alongside the existing KeyDown.

PR Checklist

Validation Steps Performed

The repro script in #1894 now works, both options for ReadKey: IncludeKeyUp and IncludeKeyDown work fine.


🔄 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/5431 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 4/20/2020 **Status:** ✅ Merged **Merged:** 4/22/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/lelian/idontwantmybranchnametoberelevanttoday` --- ### 📝 Commits (3) - [`2495958`](https://github.com/microsoft/terminal/commit/2495958aa0fe6b271d7572d626ac4c7d021e8fec) what comes down must come back up - [`9a377ac`](https://github.com/microsoft/terminal/commit/9a377ac24a7c7ee90a41779516e4ecdc2a00de6a) also the test case - [`d781297`](https://github.com/microsoft/terminal/commit/d781297e6b460104bd7b9aed8c6e6cd8510a57d4) olol i switched the two vars ### 📊 Changes **2 files changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/InteractDispatch.cpp` (+3 -2) 📝 `src/terminal/parser/ut_parser/InputEngineTest.cpp` (+4 -2) </details> ### 📄 Description ## Summary of the Pull Request Users were not able to intercept Ctrl-C input using `$Host.UI.RawUI.ReadKey("IncludeKeyUp")`, because we weren't sending a Ctrl-C KeyUp event. This PR simply adds a KeyUp event alongside the existing KeyDown. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1894 * [x] CLA signed. * [x] Tests added/passed <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed The repro script in #1894 now works, both options for `ReadKey`: `IncludeKeyUp` and `IncludeKeyDown` work fine. --- <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:15:19 +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#26317