Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save PLNech/113542b1b68bf6c18333b526e46772c8 to your computer and use it in GitHub Desktop.

Select an option

Save PLNech/113542b1b68bf6c18333b526e46772c8 to your computer and use it in GitHub Desktop.
Fix Kitty terminal stealing Ctrl+_ (undo) from Claude Code — remap splits and pass through the keypress
# ─────────────────────────────────────────────────────────────
# Kitty + Claude Code: Fix Ctrl+_ (Undo) Conflict
# ─────────────────────────────────────────────────────────────
#
# PROBLEM:
# Kitty's default ctrl+shift+- mapping (decrease font size)
# intercepts Ctrl+_ (since _ is Shift+-), preventing Claude
# Code from receiving its "undo prompt edit" shortcut.
#
# SOLUTION:
# Add these lines to your ~/.config/kitty/kitty.conf
# Then reload with Ctrl+Shift+F5.
#
# ─────────────────────────────────────────────────────────────
# Pass ctrl+shift+- (= ctrl+_) through to apps as 0x1F (terminal undo byte)
# This fixes Claude Code's "undo prompt edit" shortcut
map ctrl+shift+- send_text all \x1f
# If you were using ctrl+shift+- for splits, move it to ctrl+alt+-
# Horizontal split (stacked)
map ctrl+alt+- launch --location=hsplit --cwd=current
# Vertical split (side by side) — unchanged, just here for reference
# map ctrl+shift+\ launch --location=vsplit --cwd=current
# Zoom out still works via ctrl+- (no shift)
# map ctrl+minus change_font_size all -1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment