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

Apple Pencil Support #713

Closed
robertherber opened this issue Jul 27, 2019 · 10 comments
Closed

Apple Pencil Support #713

robertherber opened this issue Jul 27, 2019 · 10 comments

Comments

@robertherber
Copy link
Contributor

It would be great if support was added for Apple Pencil. I imagine basic support could be easily added through just reporting back the UITouch.TouchType of the touch. This would allow for discerning between finger and pencil touches (and so trigger separate actions).

@wcandillon
Copy link

In React Native Skia, we are encouraging people to use gesture-handler whenever possible. With a Skia Canvas, knowing the touch type information seems to be quite relevant.

@laffan
Copy link

laffan commented Nov 11, 2023

Adding my support for this feature. Knowing whether the touch is a finger or stylus would be immediately valuable to several of my projects.

@rksangani
Copy link

@laffan have you added the support for apple pencil?

@m-bert
Copy link
Contributor

m-bert commented Oct 8, 2024

Hi @robertherber! I know it's been a while, but the time has come! Support for stylus and pointerType has been recently added.

You can find it in these PRs:

And read about it in docs:

@m-bert m-bert closed this as completed Oct 8, 2024
@robertherber
Copy link
Contributor Author

robertherber commented Oct 8, 2024

@m-bert Amazing news! Although I don't have a use case for it right now I'm looking forward to the opportunity to try this out, truly an enabling feature! 🙂👍

@NiuGuohui
Copy link

@m-bert Why is stylusData only present in pan and hover events? When clicking with a pencil, no more data can be obtained.

@m-bert
Copy link
Contributor

m-bert commented Oct 11, 2024

Hi @NiuGuohui! We've decided that Pan and Hover would benefit the most from this change. Could you share with us a use-case where you use different handler?

@NiuGuohui
Copy link

Hi @NiuGuohui! We've decided that Pan and Hover would benefit the most from this change. Could you share with us a use-case where you use different handler?

I have a scenario here: I am implementing a drawing program where only a pencil can be used for drawing. However, if the user only clicks with the pen (expecting to draw a point), we cannot receive pen data because the Pan event cannot be triggered.

@m-bert
Copy link
Contributor

m-bert commented Oct 14, 2024

@NiuGuohui Okay, i see. I think that setting minDistance to 0 will help. Could you check that?

@NiuGuohui
Copy link

@NiuGuohui Okay, i see. I think that setting minDistance to 0 will help. Could you check that?

Thank you very much!This method really works effectively!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants