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

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

Original Pull Request: https://github.com/microsoft/terminal/pull/5431

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/5431 **State:** closed **Merged:** Yes --- ## 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.
claunia added the pull-request label 2026-01-31 09:15:20 +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#26322