`\⏎ for newline` is unclear
Resolved 💬 16 comments Opened Mar 4, 2025 by gerrywastaken Closed Mar 5, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Should that say [alt]+[⏎]?
I had no idea what \⏎ meant and just tried random keys till I got a newline.
16 Comments
It's saying
Backslash + Return. Do you have ideas on how to make this clearer?Also if you're using iTerm2 or VSCode as your terminal, we recommend running
/terminal-setupto remapShift + Returnto newline, since that's more typical. We don't automatically do this since it modifies the application settings.Oh! I misunderstood the instruction. I thought
\↵was either a placeholder for a character that couldn't display properly or notation for escaping the newline character. I didn't help that [Alt]+[Return] worked before even trying that specific key combination.Maybe you could show a more explicit message for first-time users:
Type a backslash ( \ ) then press Enter/Return to insert a line break. Try it now.
Then after they use it once, you could revert to the current shorter message.
This might be low priority though - I could just be an outlier, and most people probably understand the current instruction. 😁
This issue itself (even closed) might be helpful for others who get stuck and find it through Google or GitHub search.
For reference, I don't use iTerm2 or VSCode (any more) - I use Gnome Terminal and a niche terminal called Vterm.
I found it weird too. Many online text inputs (like claude.ai) accept shift enter for literal newline and not "submit", could that be used instead?
On Swedish keyboard layout \ requires alt+7 key, on macos it's shift+option+7 (absolutely horrible when coding btw) and there are many other layout where backslash requires modifier key, whereas shift+enter is always just shift+enter.
@plajjan are you using iTerm2 or VSCode, and if so, did the
/terminal-setupcommand work for you?No, I am not using iTerm2 or VS Code. I am primarily running
claudeunder stock Terminal or Ghostty.What do you expect /terminal-setup to change for me?
Got it, in that case
/terminal-setupwouldn't help you. It adds a keybinding for shift-enter, but not in Terminal or Ghostty.We'll be improving this in the next release, thanks for the suggestion!
Wow, just updated and saw the change appear.
That was pretty surreal to say something on here yesterday;
notice an update notification today;
and then see that exact change it in my terminal the next day. 😮
You lot move fast! 💓
You must be using Claude Code 😁
I'm using ghostty as well and shift+enter inserts this sequence a the cursor
[27;2;13~instead of getting to a new line. Any ideas how to to fix this?If anyone stumbles on this issue, here's the fix for ghostty shift+enter - add this to your ghostty config:
keybind = shift+enter=text:\nFWIW, I don't think the proper solution is to adapt my terminal to Claude-code. Claude code should be compatible with most terminals out of the box. I don't see why this would be hard to change in claude-code.
FWIW, operating systems should have created a standard keybinding for newline vs submit. I feel the pain here of app devs. There is no consistency in interfaces and that is the core issue.
I wrote a transcription app and ended up putting the newlines on clipboard and then pasting them to get around the the inconsistency between various interfaces. But that probably won't work for ClaudeCode as it likely doesn't want to mess with the clipboard. Seriously there should just be standards... looking at your Apple, Microsoft & Linux
Anyone found a way to hook up a keyboard shortcut to
\⏎in Warp term yet?@sobri909 this works for me
@prasoon2211 I'm not finding the ghostty equivalent keybinding config options / config file in Warp. It seems like it stores all config in plists, not plain text config files. And in its GUI settings view for keybindings there's no option for custom text actions.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.