Shift+Enter acts like Enter (submits) in KDE Konsole — multi-line input not triggered

Status Closed — not planned
Maintainer reply ✓ Yes — bcherny
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-256color
  • TERM_PROGRAM is not set by Konsole
  • KITTY_WINDOW_ID is not set by Konsole

Root cause analysis

Two compounding issues:

  1. \EOM keytab default. Konsole's default XFree4 keytab maps Shift+Return → \EOM (ESC O M, a legacy VT100 numeric-keypad sequence). Claude Code does not interpret \EOM as a newline, so the modifier is effectively dropped and the line submits. (This is what #2115 described; it was closed as "not planned.")
  1. 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 via TERM_PROGRAM. Konsole 25.12 does implement the kitty keyboard protocol, but Claude never enables it because Konsole doesn't set TERM_PROGRAM, and per #27868 the KITTY_WINDOW_ID check happens after TERM_PROGRAM resolves. So even a protocol-capable Konsole is treated as a dumb terminal.

Steps to reproduce

  1. Open Claude Code in Konsole 25.12.x.
  2. Type some text, press Shift+Enter.
  3. Expected: a newline is inserted (multi-line input continues).
  4. 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+J and \ + Enter do work as multi-line fallbacks, but Shift+Enter is the expected/industry-standard chord.

Requested fix (any one of)

  • Interpret the \EOM sequence 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_ID is honored even when TERM_PROGRAM is set/unset (#27868), letting protocol-capable Konsole work.

Related

  • #2115 — Handle \EOM escape sequence as newline for Konsole compatibility (closed "not planned")
  • #27868 — kitty detection ignores KITTY_WINDOW_ID when TERM_PROGRAM is set
  • #1259 — Support Shift+Enter for multiline input

View original on GitHub ↗

4 Comments

hyunbinseo · 2 months ago

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.

bcherny collaborator · 1 month ago

Thanks for the unusually thorough analysis — it checks out. I reproduced this on 2.1.233 on Linux: with a Konsole environment (KONSOLE_VERSION set), 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-setup has no Konsole support, matching what you saw.

This isn't a regression — Konsole Shift+Enter has never been supported in any release. ESC O M is 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;2u should also work.

🤖 Generated with Claude Code

github-actions[bot] · 1 month ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

marcindulak · 29 days ago

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.