Cancel selection on key press, then discard key press #5499

Closed
opened 2026-01-31 00:14:45 +00:00 by claunia · 4 comments
Owner

Originally created by @BartXZX on GitHub (Dec 11, 2019).

Originally assigned to: @leonMSFT on GitHub.

Description of the new feature/enhancement

Currently when cancelling a selection by pressing a key the key gets put on the command line (just like when no selection is going on). I would like to cancel selections without the key I pressed getting through to the terminal. The little selection box is bugging me when I am running some program that I don't want to provide input to, but at the same time I want to remove the selection box.

Proposed technical implementation details (optional)

Originally created by @BartXZX on GitHub (Dec 11, 2019). Originally assigned to: @leonMSFT on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 Currently when cancelling a selection by pressing a key the key gets put on the command line (just like when no selection is going on). I would like to cancel selections without the key I pressed getting through to the terminal. The little selection box is bugging me when I am running some program that I don't want to provide input to, but at the same time I want to remove the selection box. <!-- 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). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@zadjii-msft commented on GitHub (Dec 11, 2019):

Yea this seems reasonable. I suppose typically I'm running cmd and use esc to dismiss the selection, but if the underlying client is also listening for escape keypresses, this would be super annoying.

@zadjii-msft commented on GitHub (Dec 11, 2019): Yea this seems reasonable. I suppose typically I'm running `cmd` and use <kbd>esc</kbd> to dismiss the selection, but if the underlying client is also listening for escape keypresses, this would be super annoying.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 31, 2020):

We chose to specifically discard Esc-- we wanted to try this interaction model on for size.

I profiled a number of terminal emulators for their behavior here. Most of them just don't dismiss the selection. The ones that do also eat the keypress.

Maybe all of these implementations are wrong and we should converge on one. The reason it is the way that it is in the legacy windows Console is that QuickEdit is a separate mode that impacts the entire console interaction model (remember: edit/mark mode used to be accessible only through a menu, and fully pause the console)... but terminal doesn't have an equivalent concept.

@DHowett-MSFT commented on GitHub (Jan 31, 2020): We chose to specifically discard <kbd>Esc</kbd>-- we wanted to try this interaction model on for size. I profiled a number of terminal emulators for their behavior here. Most of them just don't dismiss the selection. The ones that do also eat the keypress. Maybe all of these implementations are wrong and we should converge on one. The reason it is the way that it is in the legacy windows Console is that QuickEdit is a separate mode that impacts the entire console interaction model (remember: edit/mark mode used to be accessible only through a menu, and fully pause the console)... but terminal doesn't have an equivalent concept.
Author
Owner

@BartXZX commented on GitHub (Jan 31, 2020):

That's absolutely fine for me, because I use ESC for cancelling the selection most of the time anyway.

Thank you for implementing this, and keep up the good work guys, really loving the Terminal. =)

@BartXZX commented on GitHub (Jan 31, 2020): That's absolutely fine for me, because I use <kbd>ESC</kbd> for cancelling the selection most of the time anyway. Thank you for implementing this, and keep up the good work guys, really loving the Terminal. =)
Author
Owner

@ghost commented on GitHub (Feb 13, 2020):

:tada:This issue was addressed in #4404, which has now been successfully released as Windows Terminal Preview v0.9.433.0.🎉

Handy links:

@ghost commented on GitHub (Feb 13, 2020): :tada:This issue was addressed in #4404, which has now been successfully released as `Windows Terminal Preview v0.9.433.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.9.433.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5499