Skip to content

[Bug]: Shifted punctuation is misencoded in Neovim terminal sessions #5276

Description

@cedi

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open T3 Code's built-in terminal.
  2. Start Neovim with nvim.
  3. In normal mode, press Shift+; to enter the : command line.
  4. Exit Neovim and press the same key combination in the shell for comparison.

Expected behavior

Shift+; should produce : inside Neovim and open its command-line prompt, just as it produces : in the shell.

Actual behavior

Inside Neovim, the terminal reports ; instead of :, so the command-line prompt does not open. The same key produces : correctly outside Neovim.

Neovim enables Kitty keyboard disambiguation, exposing a problem in the Ghostty WASM keyboard bridge:

  • apps/web/src/terminal/ghostty/core.ts always calls ghostty_key_event_set_consumed_mods(..., 0).
  • For Shift+;, the event text is :, the unshifted codepoint is ;, and Shift should be marked as consumed by key translation.
  • With consumed_mods = 0, the pinned encoder emits ESC[59;2u.
  • With Shift marked consumed, it emits :.

This likely affects other shifted printable characters in applications using the Kitty keyboard protocol, not only Neovim or colon.

Impact

Minor bug or occasional failure

Version or commit

main @ 30c9622

Environment

Built-in web terminal, including the web surface wrapped by the desktop app; Neovim with Kitty keyboard protocol support.

Logs or stack traces

Current consumed_mods=0: \x1b[59;2u
With consumed Shift:     :

Screenshots, recordings, or supporting files

No response

Workaround

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions