shift enter newline
Resolved 💬 21 comments Opened Aug 15, 2025 by matssk Closed Oct 19, 2025
💡 Likely answer: A maintainer (gpeal, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
It seems shift+enter for newline may have been implemented in the previous typescript version, but now it has been changed to Ctrl+J. Ctrl+J is already a shortcut in vscode and probably other IDEs too.
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
21 Comments
Shift Enter when in regular terminal
Ctrl J when in Tmux
Whatever solution ends up being adopted, what's an absolute turn-off is pasting text being unusable: it auto-submits at the first newline character and drops the rest of the text. It's impossible to copy and paste logs onto the terminal.
you guys need enable some sort of bracketed paste... we use ctr-j as an alias to ctr-v ctr-j in our software, but a shift-enter would be simpler than ctr-j for most users, i reckon
Are you all still seeing these issues? I'm on macOS (iTerm) and was able to shift + enter, ctrl + j, and paste multiline text. If so, please share your OS and terminal.
Can't use shift+enter. vscode with bash terminal on ubuntu in a remote container
Added a 👍 but just wanted to say that I am also in this exact scenario with MacOS stable + tmux in iTerm2.
The solution in claude code is
/ + Enterto escape the newline. It's not the most intuitive solution in the world, but it works well.Option+Enter please. macOS Terminal works this way.
Shift + enter, control + enter, or #3049 would be great for me. I'm also running into the issue of Ctrl+J already being an existing, heavily used shortcut in VSCode.
Running codex in tmux in Wezterm on Mac. Shift+Enter runs the command. Cmd+J is my tmux prefix. Would be wonderful not to need to remap just for this.
A quick fix for now in tmux:
That way tmux forwards Ctrl+J instead of treating it as Enter. However this means you can't go to panes below your codex pane.
Or
As an addition to @idriss-mortadi comment, if you use tmux with the vim-tmux-navigator plugin. You can configure this at the end of your
.tmux.conf:Apply the changes with
tmux source-file .tmux.confThis allows you to use
Ctrl+Jto do newlines in codex while you can still move to pane below, both in tmux and from neovim.And if you prefer to use
Shift+Enteryou can configure that key combination to sendCtrl+Jin your terminal (e.g., with Wezterm). This is my config as an example:this already works in codex-cli 0.39.0 (test on Mac/iTerm2)
Opt+Enter works now, good. But Shift+Enter still not.
Still no Shift+Enter in IntelliJ IDEA terminal.
alright could be a leftover of Claude Code's
/terminal-setup-- I have this entry in my iTerm2's "Key Bindings":<img width="564" height="200" alt="Image" src="https://github.com/user-attachments/assets/0e24f7a9-2911-49e8-bde5-2459e31b2fde" />
Shift+enter and ctrl+j should both work in the latest versions. Closing this as we haven't seen new reports for a bit and there are plenty of workarounds listed above if you have a particular setup where this happens to unfortunately not work out of the box.
@tibo-openai Problem still exists in v0.47.0.
In IntelliJ IDEA terminal. (switched to codex from claude and this problem very annoying)
But they made Alt + Enter work. Have developers ever heard of https://en.wikipedia.org/wiki/Principle_of_least_astonishment !?
I vote for either making it configurable or either Ctrl + Enter or Shift + Enter ( Alt + Enter is first time in my life and I am 34 years with computers).
I am pressing Ctrl + Enter and it start processing partial prompt instead of letting me enter the rest. This is an example how one not very thoughtful decision ruins the entire great product. Or there is a plan to move the entier world to Alt + Enter :)
If you use vscode ssh from windows to remote linux. Add this to keybindings.json
IMHO, gemini is doing the correct way. All shortcuts are not fit in my working environment(Shift+Enter/Opt+Enter/Ctrl+Enter/Ctrl+J). Gemini allows me to input a '\\' at the end of line and enter.