Skip to content

fix(pty): emit BackTab sequence for Shift+Tab - #5

Merged
freecodetiger merged 1 commit into
freecodetiger:mainfrom
infCraft:fix/shift-tab-backtab
Jul 29, 2026
Merged

fix(pty): emit BackTab sequence for Shift+Tab#5
freecodetiger merged 1 commit into
freecodetiger:mainfrom
infCraft:fix/shift-tab-backtab

Conversation

@infCraft

Copy link
Copy Markdown
Contributor

Summary

  • Preserve plain Tab as 0x09.
  • Emit the standard BackTab sequence (ESC [ Z) for Shift+Tab.
  • Add regression coverage for the key translation.

User-visible behavior

Shift+Tab can now switch Claude Code modes inside ProGhostty.

Layer touched

  • PTY / sessions
  • VT bridge / terminal state
  • Renderer
  • Workspace
  • Settings
  • Docs / CI

How I tested

  • Swift syntax check
  • scripts/check-architecture.sh
  • Full swift test — blocked locally while building libghostty-vt
  • Manual application test

Fixes #3

@infCraft
infCraft requested a review from freecodetiger as a code owner July 29, 2026 14:19
@freecodetiger
freecodetiger requested a review from Copilot July 29, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

Tests/ProGhosttyCoreTests/PTYLaunchTests.swift:42

  • This adds coverage for Shift+Tab, but the PR summary also calls out preserving plain Tab as 0x09; there isn’t a regression test asserting that behavior. Adding an explicit plain-Tab test would protect against future changes that accidentally map Tab into the BackTab sequence.
  @Test func shiftTabProducesBackTabSequence() throws {

@freecodetiger freecodetiger left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well

@freecodetiger
freecodetiger requested a review from Copilot July 29, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@freecodetiger
freecodetiger merged commit 58ed8b6 into freecodetiger:main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot toggle mode using shift + tab in Claude Code

3 participants