From bc25c64544afb0a82d004ff70ad2e0e6c2ff852a Mon Sep 17 00:00:00 2001 From: Tibor Rogulja Date: Mon, 6 Apr 2026 17:44:11 +0200 Subject: [PATCH] fix: set TERM_PROGRAM and COLORTERM env vars for terminal identification Deckard was not setting TERM_PROGRAM, so CLI tools (notably Claude Code) could not identify it as a KKP-capable terminal. This caused Shift+Enter to submit prompts instead of inserting newlines, because Claude Code only activates Kitty keyboard protocol for recognized terminals. Set TERM_PROGRAM=Deckard (standard terminal identification variable) and COLORTERM=truecolor (advertises 24-bit color support). Fixes #73 Co-Authored-By: Claude Opus 4.6 (1M context) --- Sources/Terminal/TerminalSurface.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Terminal/TerminalSurface.swift b/Sources/Terminal/TerminalSurface.swift index e891dd1..f9603d2 100644 --- a/Sources/Terminal/TerminalSurface.swift +++ b/Sources/Terminal/TerminalSurface.swift @@ -157,6 +157,10 @@ class TerminalSurface: NSObject, LocalProcessTerminalViewDelegate { // Build environment var env = ProcessInfo.processInfo.environment env["TERM"] = "xterm-256color" + env["COLORTERM"] = "truecolor" + // Advertise terminal identity so CLI tools (e.g. Claude Code) can detect + // Kitty keyboard protocol support for Shift+Enter and other modified keys. + env["TERM_PROGRAM"] = "Deckard" // Ensure UTF-8 locale for proper emoji/wide character handling in tmux if env["LANG"] == nil && env["LC_ALL"] == nil { env["LANG"] = "en_US.UTF-8"