Setting the scene
In my daily life, I use: Kitty as my terminal emulator and Tmux in it, which is a terminal multiplexer. For people who aren’t familiar with it, I would describe it like this:
Kitty being a standard terminal emulator (like ‘Terminal’, ‘Iterm’).
And Tmux being this application that I open up in Kitty and do everything inside. Tmux has a nice way of being more Keyboard-minded, with possibility to make tabs, windows and sessions in a better way.
I’m used to having all terminal-things happening in Tmux in tabs and splits and windows; and I love it!
My paper cut
Claude Code runs in your terminal emulator. But there is a bug in Kitty, so you can’t make a new line in Claude Code: Shift+Enter sends the prompt – and not a new line. Even after running: /terminal-setup the issue persists.
It was such a nuisance, that I actually tried having Claude running in iTerm instead, not running Claude with my other terminal commands.
It was close to being fine, but then I just had two terminal applications to maintain and make shortcuts for.
The solution
TL;DR-solution
Put the following in you kitty.conf :
map --when-focus-on title:claude shift+enter send_text normal,application \x0a
Descriptive solution
I decided to try and solve it for Kitty instead.
I found this post: Configuring Kitty Terminal for Claude Code Multi-line Input. Which was close!
If I add this to my ~/.config/kitty/kitty.conf :
map --when-focus-on title:claude shift+enter send_text normal,application \\\n
And opened Claude Code and typed:
Test[ENTER]
then it became:
Test\
… making a newline, but with a redundant backslash with it.
But if I added this instead:
map --when-focus-on title:claude shift+enter send_text normal,application \x0a
Then it works!
Update / Consideration
Maybe I should actually move away from Kitty. It seems to be more in the way, than it is helping me.
All I do happens in Tmux anyway.
