Configuring Kitty Terminal for Claude Code Multi-line Input

@ryeyam.bsky.social

Claude Code and Kitty Terminal

Getting multi-line input to work properly when using Claude Code in Kitty terminal requires a simple configuration change.

When using Claude Code in Visual Studio Code integrated terminal, it offers the /terminal-setup command which enables pressing shift+enter for a newline character. This happens because VS Code's integrated terminal has built-in handling for multi-line input, while Kitty terminal requires explicit configuration.

Kitty Keypress Mapping

We can add keypress mappings with kitty and use a condition to ensure the mapping only activates when desired, preventing conflicts with other terminal applications.

map --when-focus-on title:claude shift+enter send_text normal,application \\\n

To understand the mapping:

  • --when-focus-on title:claude - Only activate when window title contains "claude"
  • shift+enter - The key combination to map
  • send_text normal,application - Send text to both normal and application modes
  • \\\n - Send a backslash followed by newline (line continuation defined by Claude Code)

Steps

  1. Open your kitty.conf (e.g. ~/.config/kitty/kitty.conf)
  2. Add the following command anywhere in the file (I chose the top since the default config is massive)
    map --when-focus-on title:claude shift+enter send_text normal,application \\\n
    
  3. Restart kitty or reload your settings (ctrl+shift+f5)
  4. Open Claude Code and press shift+enter 🎉

Troubleshooting

If the mapping doesn't work, you can try these alternatives:

  • Use title:*claude* for broader matching:
    map --when-focus-on title:*claude* shift+enter send_text normal,application \\\n
    
  • Use cmdline:claude for matching the command
    map --when-focus-on cmdline:claude shift+enter send_text normal,application \\\n
    

For more advanced matching criteria, see the Kitty configuration documentation.

ryeyam.bsky.social
Ryan Schumacher

@ryeyam.bsky.social

data privacy enthusiast / fullstack platform dev / Go fanboy

https://github.com/jrschumacher

Post reaction in Bluesky

*To be shown as a reaction, include article link in the post or add link card

Reactions from everyone (0)