CTRL-C of a batch file running in CMD prompt loses terminal focus #19009

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

Originally created by @iwilliamson on GitHub (Dec 2, 2022).

Windows Terminal version

1.16.2641.0

Windows build number

10.0.19044.2251

Other Software

No response

Steps to reproduce

  1. Create a batch file that takes some time
  2. Hit CTRL-C to abort the batch file
  3. Notice the "Cancel batch job C:\batch.bat ? (Y/N/A) :"
  4. Try and press "A"
  5. The window no longer has focus - nothing happens
  6. Click the mouse in the CMD window
  7. Press "A"

Expected Behavior

  1. Create a batch file that takes some time
  2. Hit CTRL-C to abort the batch file
  3. Notice the "Cancel batch job C:\batch.bat ? (Y/N/A) :"
  4. Press "A"
  5. The batch file aborts

No mouse usage necessary.

Actual Behavior

See the steps to reproduce

Originally created by @iwilliamson on GitHub (Dec 2, 2022). ### Windows Terminal version 1.16.2641.0 ### Windows build number 10.0.19044.2251 ### Other Software _No response_ ### Steps to reproduce 1. Create a batch file that takes some time 2. Hit CTRL-C to abort the batch file 3. Notice the "Cancel batch job C:\batch.bat ? (Y/N/A) :" 4. Try and press "A" 5. The window no longer has focus - nothing happens 6. Click the mouse in the CMD window 7. Press "A" ### Expected Behavior 1. Create a batch file that takes some time 2. Hit CTRL-C to abort the batch file 3. Notice the "Cancel batch job C:\batch.bat ? (Y/N/A) :" 4. Press "A" 5. The batch file aborts No mouse usage necessary. ### Actual Behavior See the steps to reproduce
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Attention labels 2026-01-31 06:31:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19009