Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile/Android: support text selection with a pen/stylus. #198578

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

Splizard
Copy link
Contributor

Currently it is not possible to use a pointing device on a mobile device to make text selections, leaving the keyboard as the only viable option.

This change enables a pen to be used for selection and this works well for Android-based mobile phones and tablets with support for a pen. As it enables text to be selected with the pen instead of simply scrolling (which you can already do with touch). I've tested the [PointerEventHandler] on a Samsung Z Fold5 android (using touch & S pen) and it works well, I don't see why it should be restricted to IOS, so I've removed the platform flag.

Before this change, pens on android would act as touch input (scrolling when moved) and although I don't have an IOS device on hand to confirm, from looking at the [PointerEventHandler], it would appear that an IOS pen can only be used to perform tap gestures.

I support efforts to make text selection possible using touch-only but in the mean time, this change should help to make VS Code usable on more mobile devices.

Helps to extend, compliment and address:
#21812
#47770
microsoft/monaco-editor#246 microsoft/monaco-editor#1504

@Splizard
Copy link
Contributor Author

@microsoft-github-policy-service agree

Currently it is not possible to use a pointing device on a mobile device
to make text selections, leaving the keyboard as the only viable option.

This change enables a pen to be used for selection and this works well
for Android-based mobile phones and tablets with support for a pen. As
it enables text to be selected with the pen instead of simply scrolling
(which you can already do with touch). I've tested the
[PointerEventHandler] on a Samsung Z Fold5 android (using touch & S pen)
and it works well, I don't see why it should be restricted to IOS, so
I've removed the platform flag.

Before this change, pens on android would act as touch input and
although I don't have an IOS device on hand to confirm, from looking at
the [PointerEventHandler], it would appear that an IOS pen can only be
used to perform tap gestures.

I support efforts to make text selection possible using touch-only but
in the mean time, this change should help to make VS Code usable on more
mobile devices.

Helps to extend, compliment and address:
microsoft#21812
microsoft#47770
microsoft/monaco-editor#246
microsoft/monaco-editor#1504
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@alexdima alexdima added this to the December 2023 milestone Dec 5, 2023
@alexdima alexdima merged commit 7009d7c into microsoft:main Dec 5, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants