Kevin Cojean

Getting shift+enter to work with Kitty with Tmux

tldr; Getting shift+enter to insert newlines in a TUI running inside tmux requires bypassing tmux's key bindings. The trick is using \x1b\r (ESC + CR) in your kitty config.

I wanted shift+enter to insert a newline in Opencode's prompt instead of submitting.

The working solution:

map shift+enter send_text all \x1b\r  

This 2-byte sequence (ESC + CR) bypasses tmux's key bindings and reaches opencode as text.
The textarea inserts it as a newline.


Published on 2026-07-31
Last updated on 2026-07-31