Skip to content

Fix #445: restore Kitty keyboard protocol during attach for Shift+Enter#446

Draft
asheshgoplani wants to merge 1 commit intomainfrom
fix/445-shift-enter-attach
Draft

Fix #445: restore Kitty keyboard protocol during attach for Shift+Enter#446
asheshgoplani wants to merge 1 commit intomainfrom
fix/445-shift-enter-attach

Conversation

@asheshgoplani
Copy link
Copy Markdown
Owner

Summary

  • Fixes Shift+Enter (line break) not working in some sessions when attaching via the TUI
  • Root cause: DisableKittyKeyboard is called at TUI startup for Bubble Tea compatibility, but was never restored when attaching to tmux sessions, leaving the terminal in legacy keyboard mode
  • Adds RestoreKittyKeyboard/DisableKittyKeyboard toggle around all 4 attach paths (local, window, remote create+attach, remote attach)

Test plan

  • go build passes
  • go vet passes
  • go fmt clean
  • All unit tests pass (including keyboard_compat tests)
  • Full test suite passes via make ci (pre-push hook)
  • Manual: attach to session from TUI, verify Shift+Enter produces line break in Claude Code
  • Manual: detach and verify TUI keyboard shortcuts still work

Fixes #445

…Enter (#445)

The TUI disables the Kitty keyboard protocol at startup so Bubble Tea
can parse key input. When attaching to a tmux session, this legacy mode
persisted, preventing terminals from sending extended key sequences like
Shift+Enter (CSI u encoding). Restore the protocol before attach and
re-disable it on detach for all four attach paths (local, window, remote
create+attach, remote attach).

Fixes #445

Committed by Ashesh Goplani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't line break (shift + enter) in some sessions.

1 participant