microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.63k stars 8.32k forks source link

Add support for touchscreen selection #5159

Open moetayuko opened 4 years ago

moetayuko commented 4 years ago

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)
Nyameliaaaa commented 4 years ago

Not Useful For Developers

DHowett-MSFT commented 4 years ago

@diligamer do you speak for all developers?

Nyameliaaaa commented 4 years ago

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

zadjii-msft commented 4 years ago

@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

leonMSFT commented 4 years ago

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

j4james commented 4 years ago

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.

moetayuko commented 4 years ago

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

FranckPachot commented 3 years ago

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