-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
TextField should support apple pencil input by default. #61278
Comments
Does anyone have any thoughts and/or direction on this? I took a crack at implementing I'm imagining that we will need some kind of custom UITextField-ish representation of the EditableText from flutter. |
@cbracken Your name is all over some TODOs in the fields I've been messing with trying to figure out how to implement this, so figured I would tag you to see if you have any thoughts. I have been playing around in So far, it seems that listening for the There are still some funny issues (and you can't start scribbling till the field is focused), but that seems like a starting point. Do you have any thoughts on the right way to go about implementing Tagging @justinmc and @LongCatIsLooong as well since you have recent commits in that file. |
CC @xster in case you have any existing plans for Apple Pencil support. Do we have any existing text code that would help like this?https://github.com/flutter/engine/blob/63a78df571e88e5bf715645afb2a6b0fbf510706/lib/ui/text/paragraph.cc#L118 It would be pretty cool if we could get this working. Thanks @fbcouch for investigating. |
@justinmc Thanks for pointing out that code. That actually helped me make a little more progress on this. I couldn't figure out how to get access to the Paragraph objects from FlutterTextInput, so what I've done is add some glue code on the flutter side (meaning, in the flutter/flutter repo, not sure how you refer to this): twinsunllc@7b39621 That sends the selection boxes through the channel, and then used those on the engine side to implement some of the relevant methods: https://github.com/twinsunllc/engine/tree/feature/scribble This kinda works, but there are still a few issues that I may need some help figuring out:
I'm going to ask about this on the discord channel, but figured it would be good to have my findings recorded here as well. |
Sounds like you're getting somewhere. +1 to asking on Discord. You also might consider opening a draft PR to make it easier to take a look at your code. |
iirc currently
I think
That might be because we try to keep as few |
Thanks @LongCatIsLooong that is helpful – I pushed a couple of commits to that PR using So, I think the remaining issues here are:
|
Between twinsunllc/engine#1 and twinsunllc#1 I have the selection handles working properly now, so the last thing is starting the interaction without having focus already. I think the right thing to do will be using |
Yep, that approach seems to have worked. I have updated the draft PRs – I'm going to ask in discord to see if I can get some kind of preliminary review of the approach before rebasing onto master/adding tests (which I assume is necessary to open a real PR) |
The engine PR has been merged and the framework PR is waiting for final review, then we can ship this. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
related: #38135
not the complex implementation for pressure, tilt, etc.
but textfield should support apple pencil input by default.
figure 1 - text recignition on default text inputs.

more info about this feature
apple pencil text input works on web html inputs by default, i think it just needs to be recognized as input from ios.
Great thanks to the flutter team.
The text was updated successfully, but these errors were encountered: