[PR #6485] [MERGED] Reintroduce the check for VT_INPUT_MODE in AdaptDispatch #26700

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6485
Author: @DHowett
Created: 6/12/2020
Status: ✅ Merged
Merged: 6/15/2020
Merged by: @undefined

Base: master ← Head: dev/duhowett/unadapt_undispatch_mouse


📝 Commits (2)

  • 6e5bacb Reintroduce the check for VT_INPUT_MODE in AdaptDispatch
  • d4f59d0 ackshually this is nonoexcept but not noconst

📊 Changes

2 files changed (+30 additions, -18 deletions)

View changed files

📝 src/terminal/adapter/adaptDispatch.cpp (+28 -18)
📝 src/terminal/adapter/adaptDispatch.hpp (+2 -0)

📄 Description

This commit reverts the removal of the "SSH hack" in #5383. It was
originally added as a solution to #4911, when we realized that SSH would
request the SS3 cursor key encoding but we weren't equipped to handle
it.

A number of folks have filed issues that, in summary, say "when I use
SSH, I can't select/copy/paste text". It turns out that SSH will also
pass through requests for mouse input. Terminal dutifully responds to
those requests, of course, by disabling mouse selection/copy/paste. SSH
is NOT actually in VT_INPUT_MODE, so it will never receive the mouse
messages.

It's important to note that even with #376 fixed, we are still required
to keep this check. With the closure of #376, we'll be able to convert
VT mouse input back into Win32 mouse input for Win32 applications . . .
but SSH also doesn't know how to handle Win32 mouse input.

Fixes #6476.
Fixes #6196.
Fixes #5704.
Fixes #5608.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/6485 **Author:** [@DHowett](https://github.com/DHowett) **Created:** 6/12/2020 **Status:** ✅ Merged **Merged:** 6/15/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/duhowett/unadapt_undispatch_mouse` --- ### 📝 Commits (2) - [`6e5bacb`](https://github.com/microsoft/terminal/commit/6e5bacbfd37b44f48f61c01689fc386652281a42) Reintroduce the check for VT_INPUT_MODE in AdaptDispatch - [`d4f59d0`](https://github.com/microsoft/terminal/commit/d4f59d0d4d9ecaeb7db9032cb02010dc50422755) ackshually this is nonoexcept but not noconst ### 📊 Changes **2 files changed** (+30 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/adaptDispatch.cpp` (+28 -18) 📝 `src/terminal/adapter/adaptDispatch.hpp` (+2 -0) </details> ### 📄 Description This commit reverts the removal of the "SSH hack" in #5383. It was originally added as a solution to #4911, when we realized that SSH would request the SS3 cursor key encoding but we weren't equipped to handle it. A number of folks have filed issues that, in summary, say "when I use SSH, I can't select/copy/paste text". It turns out that SSH will _also_ pass through requests for mouse input. Terminal dutifully responds to those requests, of course, by disabling mouse selection/copy/paste. SSH is **NOT** actually in VT_INPUT_MODE, so it will never receive the mouse messages. It's important to note that even with #376 fixed, we are still required to keep this check. With the closure of #376, we'll be able to convert VT mouse input back into Win32 mouse input for Win32 applications . . . but SSH also doesn't know how to handle Win32 mouse input. Fixes #6476. Fixes #6196. Fixes #5704. Fixes #5608. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:17:38 +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#26700