Add toggle: Rich Input submit on Ctrl+Enter (vs Enter)
Summary
Add a user-facing toggle in Settings → Agents → Third Party Agents that switches the Rich Input editor's submit binding from Enter (default, current behavior) to Ctrl+Enter. When the toggle is on, Enter inserts a newline and Ctrl+Enter submits.
Motivation
Multi-line composition is awkward when Enter always submits — users who want to draft longer prompts to a CLI agent benefit from the IDE-style Ctrl+Enter submit convention.
Acceptance Criteria
- [ ] New boolean setting
submit_on_ctrl_enter(working name) declared in the AI settings group (app/src/settings/ai.rs) withdefault: false(preserves current behavior),sync_to_cloud: Globally, and an appropriatetoml_pathunderagents.*. - [ ] Toggle rendered in
CLIAgentWidget(app/src/settings_view/ai_page.rs~L6206) following the existingShouldRenderCLIAgentToolbarpattern (label,AISettingsPageAction::Toggle*variant,SwitchStateHandle). - [ ] Rich Input editor's keybinding layer reads the setting at submit time: when
false→Entersubmits (current); whentrue→Enterinserts newline,Ctrl+Entersubmits. - [ ] Setting persists across app restarts via the standard settings sync path.
- [ ] Screenshot of the toggle in the settings pane AND a screenshot/video of
Ctrl+Entersubmitting in the Rich Input attached to the PR before merge.
Out of Scope
- Generalized keybinding remapping UI.
- Changing the submit binding for non-Rich-Input editors (regular terminal input, command palette, etc.).
- Per-agent override.
Implementation Notes
Explore pass already mapped the surface:
- Settings schema pattern:
app/src/settings/ai.rs:715+(define_settings_group!) - Settings UI:
app/src/settings_view/ai_page.rs:6206-6350(CLIAgentWidget,AISubpage::ThirdPartyCLIAgents) - Existing reference toggle:
ShouldRenderCLIAgentToolbarat L6233 - Submit handling:
app/src/ai/blocklist/input_model.rs:558(handle_input_buffer_submitted) - Enter keybinding lives in the Rich Input view (
app/src/ai/blocklist/block/view_impl/input.rsand parent container) — implementer needs to locate the exact dispatch site.
🤖 Generated by Claude Code on behalf of @cbeaulieu-gt
@cbeaulieu-gt
Here's what I found while triaging this issue:
This looks like an actionable feature request. Current Rich Input behavior submits on Enter, and I did not find an existing setting that switches submission to Ctrl+Enter while making Enter insert a newline.
Maintainer details
I concluded that add a synced Third Party CLI Agents setting that makes Rich Input submit with Ctrl+Enter instead of Enter..
Triage summary
This is an actionable enhancement request for CLI agent Rich Input: add a user-facing setting that changes the submit shortcut from Enter to Ctrl+Enter, with Enter inserting a newline when enabled.
Evidence
- The requested behavior is scoped to Third Party CLI Agents / Rich Input and includes concrete acceptance criteria.
- Current code routes an open CLI agent Rich Input session through the
Entersubmit path, whileCtrl+Enteris emitted as a separate input event and does not submit the CLI agent prompt. - The AI settings group and Third Party CLI Agents settings widget already contain adjacent synced Rich Input toggles, which are the likely home for the new setting and UI.
Likely implementation area
- Add a synced boolean setting under the Third Party CLI Agents settings group.
- Render a toggle beside the existing Rich Input-related CLI agent settings.
- Update CLI agent Rich Input key handling so the setting controls whether
Entersubmits or inserts a newline, and whetherCtrl+Entersubmits. - Add focused tests for both setting states and menu-selection edge cases where
Entershould still accept the highlighted menu item.
Duplicate check
I checked open issues across the repository and recently closed issues. There are related issues about CLI-agent keybindings and newline behavior, but I did not find two or more existing issues that request this same Rich Input submit-toggle behavior.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
@advait-m Tagging you on the issue. Thought the discussion was better here.
As for how to handle the Shift+Enter vs Ctrl+Enter, these are my own observations.. i personally leaned towards ctrl only because you are probably less likely to be holding the ctrl key during regular typing, whereas the shift key is obviously used, so the odds of accidentally doing a shift+enter is higher than a ctrl+enter.
@advait-m Tagging you on the issue. Thought the discussion was better here.
As for how to handle the Shift+Enter vs Ctrl+Enter, these are my own observations.. i personally leaned towards ctrl only because you are probably less likely to be holding the ctrl key during regular typing, whereas the shift key is obviously used, so the odds of accidentally doing a shift+enter is higher than a ctrl+enter.
Yeah, starting with ctrl-enter here makes sense to me - can see if we have requests for shift-enter later!
This issue has been labeled ready-to-implement and is open for contributions involving code changes. If you'd like to tackle it, feel free to open a pull request against this issue. You can also comment @oz-agent on this issue to have the bot draft an implementation PR automatically.
Marked as ready-to-implement!
Great. So for now well support only Ctrl+Enter and this will behave the same on all Windows/MacOs/Linux systems.
Implemented in https://github.com/warpdotdev/warp/pull/11721. Settings field with default off + UI toggle, per @advait-m and @cbeaulieu-gt's settled design.