Shift+Enter acts like Enter (submits) in KDE Konsole — multi-line input not triggered
Status Closed — not planned
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Jun 29, 2026 · closed Sep 14, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Description
In KDE Konsole, pressing Shift+Enter submits the prompt instead of inserting a newline — i.e. Shift+Enter behaves identically to Enter. There is no way to enter multi-line prompts via Shift+Enter, and /terminal-setup refuses to run ("Terminal setup cannot be run from konsole").
Environment
- Claude Code CLI on Linux
- KDE Konsole 25.12.3 (
KONSOLE_VERSION=251203) TERM=xterm-256colorTERM_PROGRAMis not set by KonsoleKITTY_WINDOW_IDis not set by Konsole
Root cause analysis
Two compounding issues:
\EOMkeytab default. Konsole's default XFree4 keytab mapsShift+Return→\EOM(ESC O M, a legacy VT100 numeric-keypad sequence). Claude Code does not interpret\EOMas a newline, so the modifier is effectively dropped and the line submits. (This is what #2115 described; it was closed as "not planned.")
- Terminal detection doesn't recognize Konsole. Claude Code's kitty-keyboard-protocol support is gated on a terminal whitelist (
kitty,iTerm.app,WezTerm,ghostty) detected primarily viaTERM_PROGRAM. Konsole 25.12 does implement the kitty keyboard protocol, but Claude never enables it because Konsole doesn't setTERM_PROGRAM, and per #27868 theKITTY_WINDOW_IDcheck happens afterTERM_PROGRAMresolves. So even a protocol-capable Konsole is treated as a dumb terminal.
Steps to reproduce
- Open Claude Code in Konsole 25.12.x.
- Type some text, press Shift+Enter.
- Expected: a newline is inserted (multi-line input continues).
- Actual: the prompt is submitted, exactly as if Enter were pressed.
Things tried
/terminal-setup→ "Terminal setup cannot be run from konsole."- Spoofing
TERM_PROGRAM=kitty(scoped via alias) to force kitty-protocol negotiation → did not work (Shift+Enter still submits). Ctrl+Jand\+ Enter do work as multi-line fallbacks, but Shift+Enter is the expected/industry-standard chord.
Requested fix (any one of)
- Interpret the
\EOMsequence as a newline (reopen scope of #2115), or - Add Konsole to the kitty-protocol detection by recognizing
KONSOLE_VERSION, or - Fix the detection priority so
KITTY_WINDOW_IDis honored even whenTERM_PROGRAMis set/unset (#27868), letting protocol-capable Konsole work.
Related
- #2115 — Handle
\EOMescape sequence as newline for Konsole compatibility (closed "not planned") - #27868 — kitty detection ignores
KITTY_WINDOW_IDwhenTERM_PROGRAMis set - #1259 — Support Shift+Enter for multiline input
4 Comments
Not stale. Still happens in Claude Code v2.1.222
If you just need a workaround in KDE, Zed's integrated terminal does support Shift + Enter.
I am just using "Open a new workspace" which opens a clean window that can be used for terminal only.
<img width="1160" height="477" alt="Image" src="https://github.com/user-attachments/assets/d6075a44-4552-4ea7-a24e-2bf229773add" />
Since Zed cannot be set as the default terminal application - Dolphin still uses Konsole in its panel - I would love this to be fixed.
Thanks for the unusually thorough analysis — it checks out. I reproduced this on 2.1.233 on Linux: with a Konsole environment (
KONSOLE_VERSIONset), sending the exact bytes Konsole's default XFree4 keytab emits for Shift+Return (ESC O M) submits the prompt, while the CSI-u form (ESC [13;2u) correctly inserts a newline. I also confirmed Claude Code doesn't request enhanced keyboard reporting in Konsole (no kitty-protocol or modifyOtherKeys negotiation happens at startup there), and/terminal-setuphas no Konsole support, matching what you saw.This isn't a regression — Konsole Shift+Enter has never been supported in any release.
ESC O Mis the legacy VT100 keypad-Enter sequence, so it's treated as plain Enter, and Konsole isn't on the list of terminals where enhanced key reporting is enabled. It's also missing from the terminal support table in the docs (https://code.claude.com/docs/en/terminal-config), which should at least list it — agreed that silently submitting is a confusing failure mode.Keeping this open as a feature gap. Until then, the universal workarounds work in Konsole: Ctrl+J or
\then Enter to insert a newline; a custom keytab entry mapping Shift+Return to\E[13;2ushould also work.🤖 Generated with Claude Code
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue was incorrectly closed by the github-actions bot, despite having reproduction steps and Claude version, and despite the mention
Keeping this open as a feature gap. This bot behavior is tracked in https://github.com/anthropics/claude-code/issues/87647. Consider upvoting that issue for visibilty, maybe the bot behavior gets fixed.