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

support multiple keybindings for some actions #2884

Merged
merged 2 commits into from
Mar 26, 2024
Merged

support multiple keybindings for some actions #2884

merged 2 commits into from
Mar 26, 2024

Conversation

devoncarew
Copy link
Member

@devoncarew devoncarew commented Feb 29, 2024

Note that the behavior of cmd-s changes with this PR; before, it runs the snippet, after, it formats it. cmd-r is probably better as a run keybinding (and will probably prevent people from unintentionally reloading the dartpad page), and cmd-s should be familiar to vs code users as many have format-on-save active.

Screenshot 2024-02-29 at 8 06 40 AM
  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.


final ShortcutActivator reloadKeyActivator = SingleActivator(
LogicalKeyboardKey.keyS,
final ShortcutActivator runKeyActivator1 = SingleActivator(
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to make sure we're following best-practices for shortcuts and actions: https://docs.flutter.dev/ui/interactivity/actions-and-shortcuts

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 - I filed #2913 to track this

@devoncarew devoncarew merged commit 9cf03f0 into main Mar 26, 2024
4 checks passed
@devoncarew devoncarew deleted the keybindings branch March 26, 2024 18:27
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.

No discoverable keyboard shortcut to "Auto-format" No discoverable keyboard shortcut to "Run"
2 participants