Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Nov 6, 2025

This PR supersedes #8556 to land the requested fixes because the original branch is on a fork and is not pushable from this environment.

Related GitHub Issue

Closes: #8555

Description

This PR introduces a new toggle in the settings under the "UI" section that allows users to switch between two input behaviors in the chat prompt editor:

  • Enter = newline, Shift+Enter / Ctrl+Enter = send
  • Enter = send, Shift+Enter = newline (current default)

The change is implemented by listening to the keydown event in the prompt input component and conditionally intercepting the Enter key based on the user’s preference, which is stored via VS Code’s configuration API.

This addresses user pain points around accidental submissions, ergonomic fatigue from holding Shift, and conflicts with input method workflows.

Test Procedure

  • Send a message normally in the chat input
  • Enable the feature
  • Be happy that when you press enter, you receive a new line, and when you press ctrl+enter, the message is sent.
  • Disable the feature
  • Be happy that everything is back to default behavior.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

The settings panel
image

Didn't send the message after pressing enter:
image

Did send it when pressing ctrl+enter
image

Documentation Updates

  • This implementation does not introduce any new hardcoded keybindings beyond using standard modifier combinations (Shift+Enter, Ctrl+Enter), which are already common in chat interfaces.
  • It would be ideal if there are documentation written to allow users to understand how to change the setting, but I think it is very intuitive
  • I do not have time to write docs for this feature

Additional Notes

Get in Touch

Discord: lmtr0


Important

Adds a toggle to switch input behaviors in chat prompt editor with platform-specific key hints and updates i18n files.

  • Behavior:
    • Adds a toggle in settings under "UI" to switch input behaviors in chat prompt editor.
    • Implements keydown event listener in ChatTextArea.tsx to intercept Enter key based on user preference.
    • Supports platform-specific key hints using platform.ts.
  • Settings:
    • Adds requireCtrlEnterToSend boolean to globalSettingsSchema in global-settings.ts.
    • Updates SettingsView.tsx and UISettings.tsx to include new toggle.
  • Internationalization:
    • Updates i18n files for multiple languages to include new key hints.
  • Testing:
    • Adds tests in ChatTextArea.spec.tsx for new keyboard handling behavior.

This description was created by Ellipsis for 18c1f69. You can customize this summary. It will automatically update as commits are pushed.

@hannesrudolph hannesrudolph mentioned this pull request Nov 6, 2025
6 tasks
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 6, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 6, 2025

Oroocle Clock   See task on Roo Cloud

Re-review complete. No new issues found in this commit.

Issues resolved:

  • Fix JSON structure in Italian settings - missing description field for collapseThinking
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the UI/UX UI/UX related or focused label Nov 6, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 6, 2025
"label": "Comprimi i messaggi di pensiero per impostazione predefinita",
"description": "Se abilitato, i blocchi di pensiero verranno compressi per impostazione predefinita finché non interagisci con essi"
"label": "Comprimi i messaggi di pensiero per impostazione predefinita"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

The collapseThinking object is missing its description field, which breaks the JSON structure. This will cause i18n lookups to fail when users try to view this setting in Italian.

Suggested change
},
"collapseThinking": {
"label": "Comprimi i messaggi di pensiero per impostazione predefinita",
"description": "Se abilitato, i blocchi di pensiero verranno compressi per impostazione predefinita finché non interagisci con essi"
},

Fix it with Roo Code or mention @roomote and request a fix.

"label": "Comprimi i messaggi di pensiero per impostazione predefinita",
"description": "Se abilitato, i blocchi di pensiero verranno compressi per impostazione predefinita finché non interagisci con essi"
"label": "Comprimi i messaggi di pensiero per impostazione predefinita"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

The collapseThinking object is missing its description field, which breaks the JSON structure. This will cause i18n lookups to fail when users try to view this setting in Italian.

Suggested change
},
"collapseThinking": {
"label": "Comprimi i messaggi di pensiero per impostazione predefinita",
"description": "Se abilitato, i blocchi di pensiero verranno compressi per impostazione predefinita finché non interagisci con essi"
},

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph force-pushed the fix/ctrl-enter-send-8556 branch from 58c93eb to 31ab4be Compare November 6, 2025 16:18
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Nov 6, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Nov 6, 2025
@lmtr0
Copy link

lmtr0 commented Nov 15, 2025

@hannesrudolph Can I get a time line for when this might get merged. It's disrupting my workflow quite a lot

lmtr0 and others added 8 commits December 5, 2025 17:22
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
…tform key renders in Settings; clean ChatView lint
@hannesrudolph hannesrudolph force-pushed the fix/ctrl-enter-send-8556 branch from 8571f3b to ecb6ce1 Compare December 6, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Chat: Ctrl Enter Send

3 participants