ESC cancels scroll-back and is sent to shell (?) #18833

Closed
opened 2026-01-31 06:25:47 +00:00 by claunia · 1 comment
Owner

Originally created by @vefatica on GitHub (Nov 5, 2022).

When a Windows Terminal shell pane is scrolled back, ESC cancels the scroll-back AND is also sent to the shell. For all my Windows shells, that wipes out any command line in progress. Is that as desired?

Consider the scenario in which I'l composing a command and I want to see something from earlier in the session, so I scroll back. Maybe I don't remember where I left off (so I don't want to just start typing), or the command line is not ready for pasting something I might have copied from the history. It'd be nice to be able to get back to the command line with it intact. ESC is my go-to key for such things. Must ESC also go to the shell when it cancels scroll-back? Is there another (harmless in all shells) keystroke I could use?

Originally created by @vefatica on GitHub (Nov 5, 2022). When a Windows Terminal shell pane is scrolled back, ESC cancels the scroll-back AND is also sent to the shell. For all my Windows shells, that wipes out any command line in progress. Is that as desired? Consider the scenario in which I'l composing a command and I want to see something from earlier in the session, so I scroll back. Maybe I don't remember where I left off (so I don't want to just start typing), or the command line is not ready for pasting something I might have copied from the history. It'd be nice to be able to get back to the command line with it intact. ESC is my go-to key for such things. Must ESC also go to the shell when it cancels scroll-back? Is there another (harmless in all shells) keystroke I could use?
claunia added the Resolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 06:25:47 +00:00
Author
Owner

@carlos-zamora commented on GitHub (Nov 7, 2022):

You can already do this with Ctrl+Shift+End to scroll to the bottom. We've noticed that this behavior is consistent with Gnome Terminal and XTerm.

Aside from that, potential ideas include:

  • scrollToBottom action can be bound to ESC. We would need to add some functionality where if you're already at the bottom, the key chord gets passed through (i.e. "esc" passes to the shell when you're already at the bottom)
  • snapToInput is a profile setting. We could modify that to include this kind of functionality? That seems like the wrong direction though.
    None really sound enticing, tbh. Closing as by design.
@carlos-zamora commented on GitHub (Nov 7, 2022): You can already do this with <kbd>Ctrl+Shift+End</kbd> to scroll to the bottom. We've noticed that this behavior is consistent with Gnome Terminal and XTerm. Aside from that, potential ideas include: - `scrollToBottom` action can be bound to `ESC`. We would need to add some functionality where if you're already at the bottom, the key chord gets passed through (i.e. "esc" passes to the shell when you're already at the bottom) - `snapToInput` is a profile setting. We could modify that to include this kind of functionality? That seems like the wrong direction though. None really sound enticing, tbh. Closing as by design.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18833