Skip to content

DisableKittyKeyboard pushes mode 0 instead of popping, breaks capitals on Ghostty #472

@MikeMikeLeeLee

Description

@MikeMikeLeeLee

Bug

Can't type capital letters on the dashboard when using Ghostty terminal.

Root cause

DisableKittyKeyboard in internal/ui/keyboard_compat.go sends ESC[>0u (push Kitty mode 0). On Ghostty, pushing any mode onto the Kitty stack activates CSI u encoding. Bubble Tea v1.3.10 doesn't parse CSI u sequences (they become unknownCSISequenceMsg), so shifted keys are silently dropped.

Fix

Change push to pop in DisableKittyKeyboard:

// Before (breaks Ghostty):
_, _ = io.WriteString(w, "\x1b[>0u")   // Push mode 0

// After (works):
_, _ = io.WriteString(w, "\x1b[<u")    // Pop mode (no-op if stack empty)

Pop is safe -- if nothing was on the stack, it's a no-op. If something was pushed by another app, it restores the previous state.

Steps to reproduce

  1. Open agent-deck in Ghostty terminal
  2. Try typing a capital letter on the dashboard (e.g. Shift+A in a text field)
  3. Nothing appears

Environment

  • Terminal: Ghostty
  • OS: macOS
  • Bubble Tea: v1.3.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions