fix: restore keyboard mode after session detach#394
Merged
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom Mar 26, 2026
Merged
Conversation
After detaching from a tmux session with Ctrl+Q, the Kitty keyboard protocol could remain enabled if a tool inside the session (e.g. Claude Code) activated it. This left Bubble Tea unable to parse shift-modified keys (M, R, F, W, etc.), making shortcuts like Move-to-group silently fail. Fix: re-send DisableKittyKeyboard after PTY cleanup so the outer terminal reverts to legacy key reporting before Bubble Tea resumes. Also extracts DisableKittyKeyboard/RestoreKittyKeyboard into a shared internal/terminal package to avoid an import cycle between ui and tmux. Fixes asheshgoplani#382
96d8d40 to
6a1dc9b
Compare
Steven17D
pushed a commit
to Steven17D/agent-deck
that referenced
this pull request
Mar 25, 2026
4 tasks
Steven17D
pushed a commit
to Steven17D/agent-deck
that referenced
this pull request
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DisableKittyKeyboardafter PTY cleanup so the terminal reverts to legacy key reporting before Bubble Tea resumes inputChanges
internal/terminal/keyboard.go— new shared package withDisableKittyKeyboardandRestoreKittyKeyboard(extracted to avoid import cycle betweenuiandtmux)internal/tmux/pty.go— callterminal.DisableKittyKeyboardincleanupAttach()after style resetinternal/ui/keyboard_compat.go— delegate tointernal/terminalinstead of inlining escape sequencesTest plan
Fixes #382
🤖 Generated with Claude Code