Add support for touchscreen selection #7181

Open
opened 2026-01-31 00:57:10 +00:00 by claunia · 11 comments
Owner

Originally created by @moetayuko on GitHub (Mar 28, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Description of the new feature/enhancement

I'm a Surface pro user and sometimes need to use CLI tools without bothering to pick up the keyboard (although it's a mess to type with on-screen keyboard), but it turns out that Windows Terminal is not optimized for touchscreen at all.

Proposed technical implementation details (optional)

As far as I can tell, the following need to be implemented:

  1. Automatically popup on-screen keyboard and resize the window to fit it on touch.
  2. Long press to select/copy/paste.
  3. Zoom with finger gestures (https://github.com/microsoft/terminal/issues/3149)
Originally created by @moetayuko on GitHub (Mar 28, 2020). Originally assigned to: @carlos-zamora 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 <!-- 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'm a Surface pro user and sometimes need to use CLI tools without bothering to pick up the keyboard (although it's a mess to type with on-screen keyboard), but it turns out that Windows Terminal is not optimized for touchscreen at all. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> As far as I can tell, the following need to be implemented: 1. Automatically popup on-screen keyboard and resize the window to fit it on touch. 2. Long press to select/copy/paste. 3. Zoom with finger gestures (https://github.com/microsoft/terminal/issues/3149)
claunia added the Issue-TaskArea-InputProduct-TerminalArea-TerminalControl labels 2026-01-31 00:57:10 +00:00
Author
Owner

@Nyameliaaaa commented on GitHub (Mar 28, 2020):

Not Useful For Developers

@Nyameliaaaa commented on GitHub (Mar 28, 2020): Not Useful For Developers
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 28, 2020):

@diligamer do you speak for all developers?

@DHowett-MSFT commented on GitHub (Mar 28, 2020): @diligamer do you speak for all developers?
Author
Owner

@Nyameliaaaa commented on GitHub (Mar 29, 2020):

@DHowett-MSFT Well, Most Developers Don't Use Touchscreens.

@Nyameliaaaa commented on GitHub (Mar 29, 2020): @DHowett-MSFT Well, Most Developers Don't Use Touchscreens.
Author
Owner

@zadjii-msft commented on GitHub (Mar 30, 2020):

@diligamer Ah yes, but some developers do use touchscreens, so we shouldn't discount the opinion of a minority of users based solely on the fact that they're a minority.


Back on topic, I could have sworn that @leonMSFT actually already implemented having the on-screen keyboard appear when you tap on the Terminal. @dianlujitao what verison of the Terminal are you using?

I'm fine with leaving this open to track "Long press to select/copy/paste.", since

  • "Automatically popup on-screen keyboard and resize the window to fit it on touch." should already work
  • "Zoom with finger gestures" is already being tracked by #3149.
@zadjii-msft commented on GitHub (Mar 30, 2020): @diligamer Ah yes, but _some_ developers _do_ use touchscreens, so we shouldn't discount the opinion of a minority of users based solely on the fact that they're a minority. <hr> Back on topic, I could have sworn that @leonMSFT actually already implemented having the on-screen keyboard appear when you tap on the Terminal. @dianlujitao what verison of the Terminal are you using? I'm fine with leaving this open to track "Long press to select/copy/paste.", since * "Automatically popup on-screen keyboard and resize the window to fit it on touch." _should_ already work * "Zoom with finger gestures" is already being tracked by #3149.
Author
Owner

@leonMSFT commented on GitHub (Mar 30, 2020):

The on-screen keyboard still seems to work as of ver. 0.11.842 on my surface book when i detach my screen FYI!

@leonMSFT commented on GitHub (Mar 30, 2020): The on-screen keyboard still seems to work as of ver. 0.11.842 on my surface book when i detach my screen FYI!
Author
Owner

@j4james commented on GitHub (Mar 30, 2020):

The on-screen keyboard still seems to work as of ver. 0.11.842 on my surface book when i detach my screen FYI!

Yes! That works for me too. I would have thought just turning on tablet mode might be enough, but this is OK.

However, even with the screen detached, I can't get touch to work for mouse click operations. For example, when using the Linux dialog utility, it doesn't seem to register taps on the dialog buttons.

@j4james commented on GitHub (Mar 30, 2020): > The on-screen keyboard still seems to work as of ver. 0.11.842 on my surface book when i detach my screen FYI! Yes! That works for me too. I would have thought just turning on tablet mode might be enough, but this is OK. However, even with the screen detached, I can't get touch to work for mouse click operations. For example, when using the Linux `dialog` utility, it doesn't seem to register taps on the dialog buttons.
Author
Owner

@moetayuko commented on GitHub (Mar 31, 2020):

Yes, can confirm that on-screen keyboard works after turning on tablet mode as @j4james mentioned

@moetayuko commented on GitHub (Mar 31, 2020): Yes, can confirm that on-screen keyboard works after turning on tablet mode as @j4james mentioned
Author
Owner

@FranckPachot commented on GitHub (Aug 12, 2021):

touch screen should just act like mouse. Here is, for an example, tmux default mouse actions:

bind-key    -T copy-mode    MouseDown1Pane        select-pane
bind-key    -T copy-mode    MouseDrag1Pane        select-pane \; send-keys -X begin-selection                                               bind-key    -T copy-mode    MouseDragEnd1Pane     send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode    WheelUpPane           select-pane \; send-keys -X -N 5 scroll-up
bind-key    -T copy-mode    WheelDownPane         select-pane \; send-keys -X -N 5 scroll-down
bind-key    -T copy-mode    DoubleClick1Pane      select-pane \; send-keys -X select-word
bind-key    -T copy-mode    TripleClick1Pane      select-pane \; send-keys -X select-line

I suppose all that should by supported from touchscreen

@FranckPachot commented on GitHub (Aug 12, 2021): touch screen should just act like mouse. Here is, for an example, tmux default mouse actions: ``` bind-key -T copy-mode MouseDown1Pane select-pane bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line ``` I suppose all that should by supported from touchscreen
Author
Owner

@blauvster commented on GitHub (Nov 20, 2024):

This really kills using Textual or any other touch oriented console application.
Textual looks great in WT and works as expected with a mouse, but since it doesn't support touch I will be switching back to conhost.

@blauvster commented on GitHub (Nov 20, 2024): This really kills using Textual or any other touch oriented console application. Textual looks great in WT and works as expected with a mouse, but since it doesn't support touch I will be switching back to conhost.
Author
Owner

@alisonatwork commented on GitHub (Oct 14, 2025):

I just got bitten by this because my mouse is currently not working. The worst part is not just that touching or tapping does absolutely nothing, but when you use the virtual touchpad which gives an on-screen touchpad that allows for navigating using the mouse cursor and left/right click like a regular mouse... still doesn't respond. In fact it responds even less - you can't even click to open the settings menu! At least I would expect the virtual touchpad to work so that we can do everything a mouse can do.

If anyone else is temporarily stuck without a mouse and can't select any more, the best solution I found is to use a bluetooth mouse app on your phone and use the phone screen as a virtual touchpad.

Edit to add: seems like the virtual touchpad does, in fact, work - just not in Administrator mode. So one solution for touchscreen users is to enable the virtual touchpad for selection.

@alisonatwork commented on GitHub (Oct 14, 2025): I just got bitten by this because my mouse is currently not working. The worst part is not just that touching or tapping does absolutely nothing, but when you use the virtual touchpad which gives an on-screen touchpad that allows for navigating using the mouse cursor and left/right click like a regular mouse... still doesn't respond. In fact it responds even less - you can't even click to open the settings menu! At least I would expect the virtual touchpad to work so that we can do everything a mouse can do. If anyone else is temporarily stuck without a mouse and can't select any more, the best solution I found is to use a bluetooth mouse app on your phone and use the phone screen as a virtual touchpad. Edit to add: seems like the virtual touchpad does, in fact, work - just not in Administrator mode. So one solution for touchscreen users is to enable the virtual touchpad for selection.
Author
Owner

@ant31 commented on GitHub (Oct 15, 2025):

touch screen should just act like mouse. Here is, for an example, tmux default mouse actions:

bind-key    -T copy-mode    MouseDown1Pane        select-pane
bind-key    -T copy-mode    MouseDrag1Pane        select-pane \; send-keys -X begin-selection                                               bind-key    -T copy-mode    MouseDragEnd1Pane     send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode    WheelUpPane           select-pane \; send-keys -X -N 5 scroll-up
bind-key    -T copy-mode    WheelDownPane         select-pane \; send-keys -X -N 5 scroll-down
bind-key    -T copy-mode    DoubleClick1Pane      select-pane \; send-keys -X select-word
bind-key    -T copy-mode    TripleClick1Pane      select-pane \; send-keys -X select-line

I suppose all that should by supported from touchscreen

No the touch screen is not interacting as a mouse on Tmux/terminal for some reason. It doesn't register any action

@ant31 commented on GitHub (Oct 15, 2025): > touch screen should just act like mouse. Here is, for an example, tmux default mouse actions: > > ``` > bind-key -T copy-mode MouseDown1Pane select-pane > bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel > bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X -N 5 scroll-up > bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X -N 5 scroll-down > bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word > bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line > ``` > > I suppose all that should by supported from touchscreen No the touch screen is not interacting as a mouse on Tmux/terminal for some reason. It doesn't register any action
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7181