[PR #14214] Skip DECPS/MIDI output on Ctrl+C/Break #30002

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

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

State: closed
Merged: Yes


Silent MIDI notes can be used to seemingly deny a user's input for long
durations (multiple minutes). This commit improves the situation by ignoring
all DECPS sequences for a second when Ctrl+C/Ctrl+Break is pressed.

Additionally it fixes a regression introduced in 666c446:
When we close a tab we need to unblock/shutdown MidiAudio early,
so that ConptyConnection::Close() can run down as fast as possible.

Validation Steps Performed

  • In pwsh in Windows Terminal 1.16 run while ($True) { echo "`e[3;8;3,~" }
    • Ctrl+C doesn't do anything
    • Closing the tab doesn't do anything
  • With these modifications in Windows Terminal:
    • Ctrl+C stops the output
    • Closing the tab completes instantly
  • With these modifications in OpenConsole:
    • Ctrl+C stops the output
    • Closing the window completes instantly
**Original Pull Request:** https://github.com/microsoft/terminal/pull/14214 **State:** closed **Merged:** Yes --- Silent MIDI notes can be used to seemingly deny a user's input for long durations (multiple minutes). This commit improves the situation by ignoring all DECPS sequences for a second when Ctrl+C/Ctrl+Break is pressed. Additionally it fixes a regression introduced in 666c446: When we close a tab we need to unblock/shutdown `MidiAudio` early, so that `ConptyConnection::Close()` can run down as fast as possible. ## Validation Steps Performed * In pwsh in Windows Terminal 1.16 run ``while ($True) { echo "`e[3;8;3,~" }`` * Ctrl+C doesn't do anything ❎ * Closing the tab doesn't do anything ❎ * With these modifications in Windows Terminal: * Ctrl+C stops the output ✅ * Closing the tab completes instantly ✅ * With these modifications in OpenConsole: * Ctrl+C stops the output ✅ * Closing the window completes instantly ✅
claunia added the pull-request label 2026-01-31 09:38:06 +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#30002