Skip to content
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

Added SuperTextField entrypoint, includes Mac OS selectors and Actions example #1596

Merged

Conversation

matthew-carroll
Copy link
Contributor

@matthew-carroll matthew-carroll commented Nov 13, 2023

By default, SuperTextField on Mac now blocks all key events and sends them directly to the OS, in case they need to be turned into selectors. Apps can alter this behavior by placing higher priority key handlers above that one, or completely replacing the key handlers in the text field.

By forcibly bypassing all Flutter focus nodes, key events like ESC will go directly to the OS, generate a selector, like "cancel operation", which will be sent to the IME and received by the text field.

SuperTextField has a map of default selector behaviors. If the defaults should be changed, please let me know.

Apps can customize selector actions by providing their own entries in the selector action map. They can add to the default actions, or completely replace the default actions.

Copy link
Collaborator

@angelosilvestre angelosilvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some minor comments.

super_editor/example/lib/main_super_text_field.dart Outdated Show resolved Hide resolved
super_editor/example/lib/main_super_text_field.dart Outdated Show resolved Hide resolved
super_editor/example/lib/main_super_text_field.dart Outdated Show resolved Hide resolved
@matthew-carroll matthew-carroll merged commit ef97038 into main Nov 14, 2023
10 of 11 checks passed
@matthew-carroll matthew-carroll deleted the 1583_supertextfield-let-clients-respond-to-selectors branch November 14, 2023 21:58
github-actions bot pushed a commit that referenced this pull request Nov 14, 2023
…end all key events directly to OS, add SuperTextField demo app entyrpoint (Resolves #1583) (#1596)
matthew-carroll added a commit that referenced this pull request Nov 14, 2023
…end all key events directly to OS, add SuperTextField demo app entyrpoint (Resolves #1583) (#1596)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants