Skip to content

Windows + AZERTY: Shift+letter never registers when kitty keyboard protocol is enabled (CSI-u decoder regression) #1042

@flupkede

Description

@flupkede

Summary

On Windows with an AZERTY keyboard layout, Shift + any letter key is silently dropped by opentui-based apps (reproduced in opencode TUI) when the host terminal advertises support for the kitty keyboard protocol. Shift combined with non-letter keys works most of the time, and Caps Lock works for uppercase input — only the Shift-modifier-with-letter path is broken.

Disabling the kitty keyboard protocol in the terminal makes the bug disappear entirely, which points at opentui's CSI-u decoder.

Environment

  • OS: Windows (native, no WSL)
  • Keyboard layout: AZERTY
  • Terminal: WezTerm
  • opencode: 1.14.46 (also reproduced on 1.14.41)

Workaround that confirms the cause

config.enable_kitty_keyboard = false

After restarting WezTerm and opencode, Shift+letter is inserted correctly. Re-enabling kitty keyboard reproduces the bug.

Likely root cause

Probably same class as #818. Shift+letter is sent as CSI-u (ESC[97;2u for Shift+a). ConPTY splits or delays these reads, parser drops the sequence. Caps Lock bypasses CSI-u by sending the uppercase codepoint directly.

Possibly related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions