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
Flutter should expose text editing shortcut logic for reuse #97830
Flutter has a ton of logic for handling keyboard shortcuts in the framework, mapping them in default_text_editing_shortcuts.dart and actually handling them privately in editable_text.dart. We should make this logic reusable by developers writing their own text editors.
Why?
Previously, this logic was exposed in a class called TextEditingActionTarget, but that was removed in #90684. It was brought up in the comments after merge that this change had broken two major text editing projects.
Besides being impractical for developers to reimplement all of this logic on their own, doing so would quickly get out of sync with Flutter's behavior and cause strange discrepancies in text editing behavior between simple TextFields and the custom text editors.
How?
The shortcuts and their behavior is already overridable by using Shortcuts and Actions widgets, but the problem is applying them to something other than an EditableText. This was possible by mixing in TextEditingActionTarget, but it was brought up in the comments that a composable solution may be preferred instead.
We should flesh out this idea and then expose it publicly.
I was wondering if there was ever any progress made in this area? Perhaps someone on the team started drafting a design document or prototypes of how text editing shortcuts could be reused.
I stumbled upon this issue while researching similar issues to mine #174758.
I don't think any progress has been made, but I am still a big advocate for doing this.
Are you thinking that a solution to this issue would solve your problem in #174758? You want to remove all the shortcuts and then reapply them yourself or something like that?
Ideally I wouldn't like to reapply them but it seems that without changing the order of operations (shortcuts->text input) it may not be possible.
Maybe text input intents could inherit from some class that could be then ignored and stopped from propagation in surrounding Shortcuts?
Activity
orestesgaolin commentedon Aug 30, 2025
I was wondering if there was ever any progress made in this area? Perhaps someone on the team started drafting a design document or prototypes of how text editing shortcuts could be reused.
I stumbled upon this issue while researching similar issues to mine #174758.
justinmc commentedon Aug 31, 2025
I don't think any progress has been made, but I am still a big advocate for doing this.
Are you thinking that a solution to this issue would solve your problem in #174758? You want to remove all the shortcuts and then reapply them yourself or something like that?
orestesgaolin commentedon Aug 31, 2025
Ideally I wouldn't like to reapply them but it seems that without changing the order of operations (shortcuts->text input) it may not be possible.
Maybe text input intents could inherit from some class that could be then ignored and stopped from propagation in surrounding Shortcuts?