Pause and resume execution of left- and right-click like in PowerShell #21623

Closed
opened 2026-01-31 07:49:56 +00:00 by claunia · 7 comments
Owner

Originally created by @github-account1111 on GitHub (May 2, 2024).

Description of the new feature/enhancement

I googled and searched through issues but couldn't find anything about this.

On Windows 10 I could left-click anywhere inside the PowerShell window, and the execution would pause. I knew the execution was paused when the title bar said "Select PowerShell." When I was ready to resume the execution I just needed to right-click anywhere on the window.

This incredibly handy feature seems to be missing in Microsoft Terminal's PowerShell on Windows 11. Now I have to either wait for the execution to finish (which depending on what I'm running could take hours) or cancel it entirely.

Proposed technical implementation details (optional)

Same as on Windows 10.

Originally created by @github-account1111 on GitHub (May 2, 2024). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> I googled and searched through issues but couldn't find anything about this. On Windows 10 I could left-click anywhere inside the PowerShell window, and the execution would pause. I knew the execution was paused when the title bar said "Select PowerShell." When I was ready to resume the execution I just needed to right-click anywhere on the window. This incredibly handy feature seems to be missing in Microsoft Terminal's PowerShell on Windows 11. Now I have to either wait for the execution to finish (which depending on what I'm running could take hours) or cancel it entirely. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Same as on Windows 10.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 07:49:56 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 2, 2024):

Is the end goal here to actually suspend the CLI application that's running connected to the Terminal, or just make it easier to select text in the scrollback/?

There's some related discussion in:

@zadjii-msft commented on GitHub (May 2, 2024): Is the end goal here to actually suspend the CLI application that's running connected to the Terminal, or just make it easier to select text in the scrollback/? There's some related discussion in: * #980 * #408
Author
Owner

@github-account1111 commented on GitHub (May 2, 2024):

It's the former. It's strange to me that most participants of those issues seem to only be interested in the latter.

Especially that second one. It's not a bug, it's the default PowerShell behavior. It doesn't "freeze." As I mentioned in the description, you can easily tell if it's active or not by looking at the title bar.

@github-account1111 commented on GitHub (May 2, 2024): It's the former. It's strange to me that most participants of those issues seem to only be interested in the latter. Especially that second one. It's not a bug, it's the default PowerShell behavior. It doesn't "freeze." As I mentioned in the description, you can easily tell if it's active or not by looking at the title bar.
Author
Owner

@zadjii-msft commented on GitHub (May 2, 2024):

Well, it's technically correct that it doesn't "freeze". But selecting in the vintage console prevents conhost from servicing any further console API calls. It just blocks the call until the selection is dismissed. That effectively pauses powershell (or any other CLI app) that's waiting on writing before continuing.

I'm guessing for most people (myself included) are just happy that selecting the Terminal accidentally doesn't entirely pause long builds anymore. I could have sworn there was an issue floating around asking for the ability to manually pause the conpty client, but I can't find anything like that now...

@zadjii-msft commented on GitHub (May 2, 2024): Well, it's technically correct that it doesn't "freeze". But selecting in the vintage console prevents conhost from servicing any further console API calls. It just blocks the call until the selection is dismissed. That effectively pauses powershell (or any other CLI app) that's waiting on writing before continuing. I'm guessing for most people (myself included) are just happy that selecting the Terminal accidentally doesn't entirely pause long builds anymore. I could have sworn there was an issue floating around asking for the ability to manually pause the conpty client, but I can't find anything like that now...
Author
Owner

@github-account1111 commented on GitHub (May 2, 2024):

What's the issue with that behavior? You can just right-click to resume. Takes less than a second. Meanwhile potentially hours are wasted waiting for execution to finish, or execution has to be cancelled entirely. It also helps avoid overheating, especially if you use laptops or external drives.

You're basically eliminating a tiny little inconvenience (I even struggle to call it that, it's that inconsequential so long as you bother to look at the title bar) at the cost of quite a lot of fundamental functionality and usefulness.

@github-account1111 commented on GitHub (May 2, 2024): What's the issue with that behavior? You can just right-click to resume. Takes less than a second. Meanwhile potentially hours are wasted waiting for execution to finish, or execution has to be cancelled entirely. It also helps avoid overheating, especially if you use laptops or external drives. You're basically eliminating a tiny little inconvenience (I even struggle to call it that, it's that inconsequential so long as you bother to look at the title bar) at the cost of quite a lot of fundamental functionality and usefulness.
Author
Owner

@lhecker commented on GitHub (May 2, 2024):

Maybe you already know, but...

Actually you can still pause the output at any time: Just press the "Pause" or "Break" key. 😅 Almost all modern hardware and operating systems use the Pause/Break key for pausing terminal output. It's usually in the top right, above the Delete and Insert keys, if you have a full sized keyboard. If you don't have a Pause/Break key you can press Ctrl+S instead. On the latest Windows Terminal versions both should pause/freeze the output immediately until you press another key.

If you did already know that the Pause key does this, can you explain why it doesn't work for you?

@lhecker commented on GitHub (May 2, 2024): Maybe you already know, but... Actually you can still pause the output at any time: Just press the "Pause" or "Break" key. 😅 Almost all modern hardware and operating systems use the Pause/Break key for pausing terminal output. It's usually in the top right, above the Delete and Insert keys, if you have a full sized keyboard. If you don't have a Pause/Break key you can press Ctrl+S instead. On the latest Windows Terminal versions both should pause/freeze the output immediately until you press another key. If you did already know that the Pause key does this, can you explain why it doesn't work for you?
Author
Owner

@lhecker commented on GitHub (May 2, 2024):

You're basically eliminating a tiny little inconvenience (I even struggle to call it that, it's that inconsequential so long as you bother to look at the title bar) at the cost of quite a lot of fundamental functionality and usefulness.

Oh and... For what it's worth, I'm personally not opposed to implementing your suggestion, and I think you make an excellent argument for this feature. In fact I often did this myself (selecting to pause output), before I learned that the Pause key can be used for this.

However, we currently can't easily implement it correctly for architectural reasons (the entire ConPTY setup). It's certainly possible, for instance by sending a pause key press when selection starts and when it ends, but that's obviously going to be very error prone. For example, if someone had already paused output, or if we miss a key press somehow, or someone injects the pause key via the console APIs, in all those cases the thing the PTY sees and what Windows Terminal sees would get out of sync and you'd never be able to properly unpause the output anymore.

Given that other terminals don't seem to have this behavior, nor make it configurable, and that virtually all terminals support the Pause key and its Ctrl+S alias, I think this feature request may be too risky in my personal opinion.

@lhecker commented on GitHub (May 2, 2024): > You're basically eliminating a tiny little inconvenience (I even struggle to call it that, it's that inconsequential so long as you bother to look at the title bar) at the cost of quite a lot of fundamental functionality and usefulness. Oh and... For what it's worth, I'm personally not opposed to implementing your suggestion, and I think you make an excellent argument for this feature. In fact I often did this myself (selecting to pause output), before I learned that the Pause key can be used for this. However, we currently can't easily implement it correctly for architectural reasons (the entire ConPTY setup). It's certainly possible, for instance by sending a pause key press when selection starts and when it ends, but that's obviously going to be very error prone. For example, if someone had already paused output, or if we miss a key press somehow, or someone injects the pause key via the console APIs, in all those cases the thing the PTY sees and what Windows Terminal sees would get out of sync and you'd never be able to properly unpause the output anymore. Given that other terminals don't seem to have this behavior, nor make it configurable, and that virtually all terminals support the Pause key and its Ctrl+S alias, I think this feature request may be too risky in my personal opinion.
Author
Owner

@carlos-zamora commented on GitHub (May 8, 2024):

Thanks for the feedback. As stated above, this is a bit risky of a change and the desired behavior should be accessible via the Pause key and its Ctrl+S alias. Closing 😊

@carlos-zamora commented on GitHub (May 8, 2024): Thanks for the feedback. As stated above, this is a bit risky of a change and the desired behavior should be accessible via the Pause key and its Ctrl+S alias. Closing 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21623