GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — fix(app): make prompt submit and newline rebindable by CasualDeveloper · Pull Request #23430 · anomalyco/opencode Conversation
|
| Bindings | Key pressed | Observed |
|---|---|---|
Default enter submit / shift+enter newline |
Shift+Enter |
inserted <br> in the editor |
Default enter submit / shift+enter newline |
Enter on empty composer |
prevented default, no submit/fetch |
Swapped shift+enter submit / enter newline |
Enter |
inserted <br> in the editor |
Swapped shift+enter submit / enter newline |
Shift+Enter on empty composer |
prevented default, no submit/fetch |
Also verified the Keyboard Shortcuts UI shows both rows under the Prompt group and reset-to-defaults restores Enter / Shift+Enter.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Adds rebindable keybind support for prompt submission vs newline insertion in the web prompt composer by introducing prompt.submit and prompt.newline commands and switching PromptInput’s Enter handling to keybind matching.
Changes:
prompt.submit / prompt.newline commands with default bindings (Enter / Shift+Enter).PromptInput.handleKeyDown to dispatch submit/newline via matchKeybind(...) and stop propagation on matches.Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/app/src/i18n/en.ts | Adds labels for the two new prompt keybind commands. |
| packages/app/src/components/prompt-input.tsx | Registers new commands and routes Enter handling through configured keybinds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
1f54966 to
1d745d0
Compare
36cb931 to
db3f41c
Compare
1215dd4 to
79a921f
Compare
26e19b1 to
00bdc4e
Compare
Register `prompt.submit` and `prompt.newline` as disabled command entries so they appear in Settings → Keyboard Shortcuts without joining the global keymap. The prompt editor resolves those configured bindings locally via `settings.keybinds` and `matchKeybind`, preserving the defaults: Enter submits and Shift+Enter inserts a newline. This lets users who compose multi-line prompts swap or customize those bindings without changing the default desktop behavior for existing users. Related: anomalyco#16226, anomalyco#11898, anomalyco#9836
00bdc4e to
e4a4c8c
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
please reopen this PR. it’s actually ready for merge, and is quite a low impact change. just that maintainers haven’t got around to reviewing it. also the issues it closes have a lot of reactions |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This will be very useful; in most cases, I hit Enter to add a new line. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[FEATURE]: Setting to send prompt only with send button, not hitting enter.
There was an error while loading. Please reload this page.