cc <@U07TE39J96U> <@U070UP4FW3F> <@U06RMLQGNGM> a...
# proj-agent-canvas
c
cc @quick-window-91705 @elegant-branch-54423 @breezy-kilobyte-39430 a bit of more feedback on current V1 CLI that accepts
\ enter
as newline: It feels a bit awkward. If you accept
ctrl+enter
or
ctrl+J
as new line, i can hold ctrl with my left hand and keep hitting enter or J to create multiple empty newline. But for
\+enter
, my right hand have to switch between these two keys & i have to avoid accidentally hitting
enter
without prefixing it with
\
-- this doesn't feel like a great UX. Any chance we can switch to a different key-combo?
q
Yep I'm in agreement, we took this approach just because claude code does something similar (although they allow you to customize this behavior)
One problem is that most terminals do not detect simultaneous key pressed with "enter" key The character code sent just ends up being for "enter" (not "shift + enter" or "ctrl + enter")
c
😞 this is a bummer.. what about ctrl+J though
q
Yep I think I can add that as another default as well!
l
Ctrl+J is pretty much the standard. Even though it's annoying at first, one does quickly get used to it. I think you can also support ctrl/shift+enter on Windows, Codex does that. Codex also hides any long text you paste by showing a [Pasted content x chars] in its place, which is pretty neat. The older OH CLI had a multiline mode, enabled through an env var, where enter just created a new line and Ctrl+D sent the message. No idea how practical that is though. Edit: in addition of shift+enter for Windows, you could also add alt+enter for the terminals that support it. Edit: the env var I was referring above (undocumented apparently) is
CLI_MULTILINE_INPUT
(set to true to enable Enter=NewLine&Ctrl+D=Submit in the current(old) OH CLI)
b
I don't have any data on which is more common in CLI apps both appear common. Both appear to be common. Here's what chatgpt said:
I suppose we could support both though, right?
c
i think for interactive application, i'd vote for ctrl+J though
l
I tried the most popular CLIs and made a table. Claude Code has also a command that sets up shift+enter for some terminals. I also had gpt-5 made a Codex-like small atomic paste demo, no idea if it breaks on some languages though. Gist here: https://gist.github.com/llamantino/376312b34f10dda618f6d0d90c284768
🙌 3
e
Great data!