[Feature] More configurable keybinding behavior for enter/return and submit vs newLine
#1411
jabr
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Area
TUI
Problem
In any multi-line text input, I prefer re-binding the
enterkey tonewlineand then something likectrl+entertosubmit. Without it, I frequently send half written prompts accidentally.I am able to do that with Prime Agent just fine, but then it also applied those bindings to submitting slash commands and single-line inputs (e.g. text entry fields in modals like entering a provider's API key). For those cases, I prefer the original default with a simple
enterto submit.Proposed direction
Locally, I (with AI coding assistant) implemented a new
tui.input.lineSubmitkeybinding to optionally override the behavior in the slash command and single-line input cases.And then to all work how I want, my
keybindings.jsonnow looks like this:For reference, the original PR is in the auto-closed #1109
Alternatives considered
Another option would be to not make the slash command and single-line input cases configurable, and instead "hard code" those to a simple
enter. I expect most users that want my multi-line "inverted enter" behavior would also want it to not apply in these cases.Also, another approach would be a simple "invert enter" toggle (which is what many apps do) which typically just flips
enterandshift+enter(though also does the above with a fixedenterfor the single line cases).Additional context
The lack of a configurable "inverted enter" behavior is a common and long-standing user complaint about Claude Code: anthropics/claude-code#2054
All reactions