claude-code - 💡(How to fix) Fix [Bug] /tui fullscreen: Shift+letter produces lowercase on Ghostty (Kitty keyboard protocol) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49359Fetched 2026-04-17 08:43:23
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Root Cause

Ghostty supports the Kitty keyboard protocol (progressive enhancement), which encodes modifier keys as structured escape sequences (e.g. shift;a) rather than the raw character (A).

When Claude Code's fullscreen TUI enables this protocol (via xterm-ghostty terminfo), Shift+A arrives as a modifier+keycode sequence. It appears the TUI's key decoder handles shift+special_key combinations (arrows, tab, etc.) but does not translate shift + alpha → uppercase, so the character is emitted as lowercase.

Setting TERM=xterm-256color prevents Ghostty from advertising the extended protocol, reverting to the legacy behavior where uppercase is handled at the OS/keyboard driver level before reaching the application.

Fix Action

Fix / Workaround

Confirmed workaround

Code Example

TERM=xterm-256color claude
RAW_BUFFERClick to expand / collapse

Describe the bug

In /tui fullscreen mode, pressing Shift+<letter> produces the lowercase character. For example, Shift+A renders a. Normal typing outside fullscreen TUI is unaffected.

Environment

  • Claude Code: v2.1.111
  • Terminal: Ghostty 1.3.1 on macOS Darwin 25.4.0
  • TERM=xterm-ghostty
  • TERMINFO=/Applications/Ghostty.app/Contents/Resources/terminfo

Steps to reproduce

  1. Launch claude in Ghostty (default TERM=xterm-ghostty)
  2. Enter /tui fullscreen
  3. Type Shift+A — observe lowercase a

Confirmed workaround

TERM=xterm-256color claude

With TERM=xterm-256color, /tui fullscreen correctly produces uppercase characters. This confirms the bug is specific to the xterm-ghostty terminal type and its extended key reporting.

Root cause analysis

Ghostty supports the Kitty keyboard protocol (progressive enhancement), which encodes modifier keys as structured escape sequences (e.g. shift;a) rather than the raw character (A).

When Claude Code's fullscreen TUI enables this protocol (via xterm-ghostty terminfo), Shift+A arrives as a modifier+keycode sequence. It appears the TUI's key decoder handles shift+special_key combinations (arrows, tab, etc.) but does not translate shift + alpha → uppercase, so the character is emitted as lowercase.

Setting TERM=xterm-256color prevents Ghostty from advertising the extended protocol, reverting to the legacy behavior where uppercase is handled at the OS/keyboard driver level before reaching the application.

extent analysis

TL;DR

Setting TERM=xterm-256color before launching claude is a confirmed workaround to produce uppercase characters in fullscreen TUI mode.

Guidance

  • The issue is specific to the xterm-ghostty terminal type and its extended key reporting, which encodes modifier keys as structured escape sequences.
  • To verify the workaround, launch claude with TERM=xterm-256color and enter /tui fullscreen mode, then type Shift+A to observe the correct uppercase character.
  • The root cause is related to the TUI's key decoder not translating shift + alpha → uppercase when the Kitty keyboard protocol is enabled.
  • Using TERM=xterm-256color prevents Ghostty from advertising the extended protocol, reverting to legacy behavior where uppercase is handled at the OS/keyboard driver level.

Example

No code snippet is necessary in this case, as the workaround is a simple environment variable change: TERM=xterm-256color claude.

Notes

This workaround may not be ideal for users who rely on the features provided by the Kitty keyboard protocol, as it disables the extended key reporting.

Recommendation

Apply the workaround by setting TERM=xterm-256color before launching claude, as it is a confirmed solution to produce uppercase characters in fullscreen TUI mode. This is a reasonable trade-off until a more comprehensive fix is available that handles the extended key protocol correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] /tui fullscreen: Shift+letter produces lowercase on Ghostty (Kitty keyboard protocol) [1 participants]