You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deleteBackward or keyPress event for Textfield #29845
One of the requirements for the project I am working on currently requires performing an action when delete key is received by the TextField widget. Particularly, there is no way to detect that delete was tapped when there is no text in the TextField.
I'd like to propose an onDelete event, or onKeyPress(keyCode) event, propagation to the end user. Please let me know your thoughts.
I believe the soft keyboard on either Android or iOS doesn't actually expose key level events like delete or key press, it only tells us what the current string is.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
jonahwilliams commentedon Mar 23, 2019
I believe the soft keyboard on either Android or iOS doesn't actually expose key level events like delete or key press, it only tells us what the current string is.
For Android, see https://stackoverflow.com/questions/4886858/android-edittext-deletebackspace-key-event.
cc @gspencergoog
vkjon commentedon Mar 24, 2019
The engine already taps into
UIKeyInput(iOS) andInputConnection(Android), we could leverage this into forwarding keys to the plugin. Sample implementation for iOS in https://github.com/SnowXD/engine/commit/fc5197d101645e001de9d8d50974758282cbb095.kangfarih commentedon May 14, 2019
Is this already implemented for current version?
vkjon commentedon May 18, 2019
@kangfarih Nope. I am going to rework it as discussed in the PR. See flutter-team-archive/engine#8606
psyanite commentedon Jul 17, 2019
I believe this is related to #14809
VladyslavBondarenko commentedon Jul 28, 2020
Please follow up on #14809, closing as duplicate
github-actions commentedon Aug 18, 2021
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
flutter doctor -vand a minimal reproduction of the issue.