Here are some tips for getting Shift+Enter to insert a newline while typing prompts in Claude Code or Codex CLI. By default it didn’t work properly when combining Alacritty with Tmux, so I configured each as shown below. Claude Code and some other tools offer a built-in setup command like /terminal-setup, but that didn’t seem to do the trick for me.

First, add the following to your Alacritty config file alacritty.yml.

[[keyboard.bindings]]
key = "Return"
mods = "Shift"
chars = "\u001b[13;2u"

Next, add the following to your Tmux config file .tmux.conf. The double-quoted string contains special characters; you should be able to enter them by pressing <Control>-v <ESC> [ 1 3 ; 2 u in sequence.

bind-key -n S-Enter send-keys -l "[13;2u"

For what it’s worth, Shift+Enter worked as expected in Claude Code and Codex CLI, but did not work in Copilot CLI. I’m sure it will be supported eventually.

You can find the full dotfiles here. bobuhiro11/dotfiles - GitHub

That’s all.