Provide api to decouple cursor and keyboard for an editable text#22468
Provide api to decouple cursor and keyboard for an editable text#22468kangwang1988 wants to merge 2 commits intoflutter:masterfrom
Conversation
… when specified disableKeyboard, this is helpful especially when the developers need a customized keyboard, where the cursor is needed but the keyboard would be always hidden.
|
Hey @kangwang1988, what's your use case for a customized keyboard? From the screenshots It looks like you could just set the keyboardType [1] of the TextField to something like [1] https://master-docs-flutter-io.firebaseapp.com/flutter/material/TextField/keyboardType.html |
|
@goderbauer |
|
This still feels like a numeric keyboard. The more idiomatic way of doing this would probably be to show the properly configured (numeric) system keyboard and display a custom view with the custom keys hovering just above the keyboard (which seem to just be the "hide keyboard" key and the yellow key). This way would respect the keyboard choice that the user made on the system, e.g. some accessibility users may have chosen a morse keyboard to enter information that way. With this approach you're making life more difficult for them. Your current implementation would also break people who have a physical keyboard attached to their device because you're no longer opening an input connection with the OS. A better way to implement this may be to add a new type Even better: iOS seems to have support for "Custom Views for Data Input" [3], which seems to be what you want. It would be cool if we could make that API useable from flutter as well. We'd have to check if there's an Android equivalent. This solution would require some more design work. Might be worth filing an issue for it. [1] https://master-docs-flutter-io.firebaseapp.com/flutter/services/TextInputType-class.html |
|
https://github.com/Im-Kevin/cool_ui |
|
I am closing this for now as there hasn't been any activity. |
Provide new api so that a cursor could be decoupled from the keyboard when specified disableKeyboard, this is helpful especially when the developers need a customized keyboard, where the cursor is needed but the keyboard would be always hidden.
What is was before:

What we want:
