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

feat(playground): hotkey to run the playground #6326

Merged
merged 8 commits into from
Feb 11, 2025

Conversation

mikeldking
Copy link
Contributor

@mikeldking mikeldking commented Feb 11, 2025

resolves #6267

This adds a command enter hotkey to run the playground. Note that the default key bindings for certain JSON editors needed to be removed.

Screenshot 2025-02-10 at 8 33 34 PM

@mikeldking mikeldking force-pushed the mikeldking/playground-hotkeys branch from 3e76a79 to c9829bc Compare February 11, 2025 03:35
@mikeldking mikeldking changed the title feat(playground): hotkeys feat(playground): hotkey to run the playground Feb 11, 2025
Comment on lines +52 to +56
// Reserve Mod-Enter for the submit button
keymap.of([
...defaultKeymap.filter((binding) => binding.key !== "Mod-Enter"),
]),
];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removes cmd enter from entering a newline

@mikeldking mikeldking marked this pull request as ready for review February 11, 2025 03:52
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 11, 2025
Copy link
Contributor

@cephalization cephalization left a comment

Choose a reason for hiding this comment

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

This is exciting. Will have to think of some way to control keymap sprawl in the future

}}
trailingVisual={
<Keyboard>
<VisuallyHidden>command</VisuallyHidden>
Copy link
Contributor

Choose a reason for hiding this comment

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

What about windows/Linux? Ctrl+Enter should be used there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added useModifierKey to detect if Mac

@mikeldking mikeldking merged commit 6aab158 into prompts Feb 11, 2025
8 checks passed
@mikeldking mikeldking deleted the mikeldking/playground-hotkeys branch February 11, 2025 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants