[BUG] /terminal-setup falsely detects ctrl+shift+enter as shift+enter in Kitty

Resolved 💬 3 comments Opened Jan 7, 2026 by merootin Closed Jan 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description

The /terminal-setup command uses a naive substring search for detecting existing shift+enter keybindings. This causes false positives when ctrl+shift+enter is configured (a completely different key combination).

## Steps to Reproduce

  1. Have this in ~/.config/kitty/kitty.conf:

map ctrl+shift+enter launch --location=hsplit

  1. Run /terminal-setup in Claude Code
  2. Get error: "Found existing Kitty Shift+Enter key binding. Remove it to continue."

## Expected Behavior

ctrl+shift+enter should NOT trigger the detection since it's a different key combination than shift+enter.

## Actual Behavior

The substring "shift+enter" within "ctrl+shift+enter" triggers the false positive.

## Environment

  • Claude Code version: 2.0.76
  • Terminal: Kitty
  • OS: NixOS (Linux)

## Suggested Fix

Use proper pattern matching that distinguishes between:

  • map shift+enter (should match)
  • map ctrl+shift+enter (should NOT match)

Example regex: /^\s*map\s+shift\+enter\s/ instead of substring search.

## Related Issues

  • #10461 - Same root cause (naive string search) affecting Ghostty

What Should Happen?

ctrl+shift+enter should NOT trigger the shift+enter detection since it's a different key combination. The terminal-setup command should only match exact shift+enter bindings, not bindings that contain "shift+enter" as a substring.

Error Messages/Logs

Found existing Kitty Shift+Enter key binding. Remove it to continue.
  See /home/username/.config/kitty/kitty.conf

Steps to Reproduce

  1. Have map ctrl+shift+enter launch --location=hsplit in ~/.config/kitty/kitty.conf
  2. Run /terminal-setup in Claude Code
  3. 3. Get false positive error about existing shift+enter binding

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗