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

Implement text navigation/edition actions in Masonry #266

Open
PoignardAzur opened this issue May 5, 2024 · 1 comment
Open

Implement text navigation/edition actions in Masonry #266

PoignardAzur opened this issue May 5, 2024 · 1 comment
Labels
masonry Issues relating to the Masonry widget layer

Comments

@PoignardAzur
Copy link
Contributor

We'd like to provide text handling that feels native to our users' platform. A major requirement is for the framework to recognize inputs like Shift+Arrow or Ctrl+Del and update the selection accordingly.

We also want to let developers provide keyboard shortcut configuration so that users can pick their own keybindings. Moreover, on MacOS the platform itself lets users customize keybindings and expect all apps to match (see this discussion on zulip).

Here is what I think we should do:

  • Create a TextUpdate enum that represents all common movements and text editions. Things like "Go to end of line", "Remove previous word".
  • For each enum variant, implement unit tests that check it's handled properly.
  • Providing a keybinding handler that maps key combinations to TextUpdates. That handler should be serializable, so we can feed it user configs.
  • Find a way to construct that handler from MacOS's user settings.
@PoignardAzur PoignardAzur added the masonry Issues relating to the Masonry widget layer label May 5, 2024
@waywardmonkeys
Copy link
Contributor

I sort of feel like this would be a good standalone crate that can be used outside of just masonry / xilem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

2 participants