-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[iOS] Hardware keyboard text editing shortcuts #28971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks ok, but I don't quite get why this change solves all three issues. Can you give a brief explanation?
UIKit checks if the current responder can handle these selectors in order to enable the text editing shortcuts for cut/copy/paste. This includes the command-c, command-v... keyboard shortcuts, as well as the buttons above the software keyboard. It's not possible to test for that functionality, since XCTest has no support to trigger keyboard shortcuts, it can only type normal text. But I found after this change that the hardware keyboard editing shortcuts work. |
shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm
Show resolved
Hide resolved
86cefc8
to
94418fb
Compare
Thanks for the explanation. Go ahead and merge when you feel like. |
Disallow pasting non-text into FlutterTextInputPlugin (flutter#29374)
Implementing these methods enables the following keyboard shortcuts:
I am not completely sure about the delete method, but it's another part of the specification that could be easily implemented. I think it will likely enable Edit->Delete when running Flutter iOS on Apple Silicon Macs, but I don't have one to test it on.
I could not find a way to get the Command-Left / Command-Right shortcuts for Beginning of line / End of line to work.
Should fix flutter/flutter#73950, flutter/flutter#70104, and flutter/flutter#68514.
Pre-launch Checklist
writing and running engine tests.
///
).