Ssh MouseEvent doesn't work with touch input #15689

Open
opened 2026-01-31 04:45:41 +00:00 by claunia · 4 comments
Owner

Originally created by @juleshummelink on GitHub (Oct 26, 2021).

Windows Terminal version (or Windows build number)

1.10.2714.0

Other Software

found it out by using HTOP on a debian linux server connected via SSH

Steps to reproduce

  1. Ssh into a linux machine via the ssh [IP] command.
  2. Open HTOP by typing sudo htop
  3. Click with your mouse on a row, it becomes selected. Now touch on another row. Nothing happens.

Expected Behavior

Touch inputs are passed to SSH.

Actual Behavior

Touch doesn't work.

Originally created by @juleshummelink on GitHub (Oct 26, 2021). ### Windows Terminal version (or Windows build number) 1.10.2714.0 ### Other Software found it out by using HTOP on a debian linux server connected via SSH ### Steps to reproduce 1. Ssh into a linux machine via the `ssh [IP]` command. 2. Open HTOP by typing `sudo htop` 3. Click with your mouse on a row, it becomes selected. Now touch on another row. Nothing happens. ### Expected Behavior Touch inputs are passed to SSH. ### Actual Behavior Touch doesn't work.
Author
Owner

@zadjii-msft commented on GitHub (Nov 15, 2021):

Huh. It should. We must have put the mouse handling in specifically the pressed event and not the tapped event or something like that.

@zadjii-msft commented on GitHub (Nov 15, 2021): Huh. It should. We must have put the mouse handling in specifically the pressed event and not the tapped event or something like that.
Author
Owner

@juleshummelink commented on GitHub (Nov 15, 2021):

I found that the bug is not ssh related. Touch works nowhere inside the terminal window. It works only in the tab bar and to scroll...

Steps to reproduce:

  • type echo https://google.com/ and hit enter
  • Clicking on the link while holding ctrl will open the page in a browser, touching the link again does nothing.
@juleshummelink commented on GitHub (Nov 15, 2021): I found that the bug is not ssh related. Touch works nowhere inside the terminal window. It works only in the tab bar and to scroll... Steps to reproduce: - type `echo https://google.com/` and hit enter - Clicking on the link while holding <kbd>ctrl</kbd> will open the page in a browser, touching the link again does nothing.
Author
Owner

@awfulcooking commented on GitHub (May 4, 2024):

Does seem to affect TUIs in general rather than specific to SSH 🙂

e.g. htop in WSL, TUIs from Windows .exe.

(v1.19.11213.0 on W11 23H2)

@awfulcooking commented on GitHub (May 4, 2024): Does seem to affect TUIs in general rather than specific to SSH 🙂 e.g. htop in WSL, TUIs from Windows .exe. (v1.19.11213.0 on W11 23H2)
Author
Owner

@j4james commented on GitHub (May 4, 2024):

FYI, the reason this doesn't work is because the touch handler in Windows Terminal is completely separate from the click handler, and the only thing the touch handler supports is panning the scrollback buffer.

As a test, I commented out the code here:
3996806503/src/cascadia/TerminalControl/TermControl.cpp (L1707-L1713)

And that allows the touch events to be passed through to the regular click handler, which is good enough to get left clicks working. But of course the scrollback panning is then not supported, and it also doesn't handle right clicks. A proper fix will require more work than that.

It's also worth noting that touch input does actually work in openconsole/conhost.

@j4james commented on GitHub (May 4, 2024): FYI, the reason this doesn't work is because the touch handler in Windows Terminal is completely separate from the click handler, and the only thing the touch handler supports is panning the scrollback buffer. As a test, I commented out the code here: https://github.com/microsoft/terminal/blob/3996806503bd573aa59a27d1ee8e98bd1d135b8b/src/cascadia/TerminalControl/TermControl.cpp#L1707-L1713 And that allows the touch events to be passed through to the regular click handler, which is good enough to get left clicks working. But of course the scrollback panning is then not supported, and it also doesn't handle right clicks. A proper fix will require more work than that. It's also worth noting that touch input does actually work in openconsole/conhost.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15689