Skip to content

Support for customizing return key #17525

Closed

Description

@goderbauer

iOS has support for changing what the return/done key on the keybaord should be labeled with, see https://developer.apple.com/documentation/uikit/uireturnkeytype?language=objc.

We should expose this in Flutter. Currently, we only support UIReturnKeyDefault and UIReturnKeyDone, see [1]

We should also cross-check this with what android supports.

[1] https://github.com/flutter/engine/blob/7fa08b3ba94cb32cf0a2f466e5ee5d539d144705/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm#L32-L36

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    on May 11, 2018
  2. sir-boformer commented on Jun 14, 2018

    @sir-boformer
    Contributor

    It would be great to have an inputAction field in the TextField widget. It's crucial for chat apps ("send"), search fields ("search") and complex forms ("next").

    I stumbled upon this issue while porting a login form: The keyboard of the user name input should display a "next" button, which moves the focus to the password input.

    Is there a time frame for the addition of this feature? It was mentioned by @goderbauer that a PR is planned.


    Here is what Android supports:

    • IME_ACTION_DONE
    • IME_ACTION_GO
    • IME_ACTION_NEXT
    • IME_ACTION_SEARCH
    • IME_ACTION_SEND
    • IME_ACTION_NONE (newline)

    https://developer.android.com/reference/android/view/inputmethod/EditorInfo

    Right now the displayed action is bound to the keyboardType of the TextField.

    In the Android engine, only a small change in the inputActionFromTextInputAction method is required to support additional actions.

  3. goderbauer commented on Jul 2, 2018

    @goderbauer
    MemberAuthor

    @matthew-carroll You implemented this, right? Can we close it?

  4. matthew-carroll commented on Jul 2, 2018

    @matthew-carroll
    Contributor

    @goderbauer Yep, I think we're good here. Interested parties can refer to the following PR:
    #18855

  5. github-actions commented on Sep 2, 2021

    @github-actions

    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.

  6. locked as resolved and limited conversation to collaborators on Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions