Repository navigation
Conversation
On macOS the terminal now translates Command+Left/Right, Command+Backspace, Command+Delete and Option+Left/Right/Delete into the control characters shells use for line and word editing. xterm.js sends nothing for Command+arrows and a plain delete for Command+Backspace, so these keys previously did nothing useful. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks done
Collaborator
|
This is an automated message. We have closed this pull request because it has been open for more than two weeks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The integrated terminal never installed a key handler, so every key went through xterm.js's default translation. On macOS that translation sends nothing for Cmd+Left and Cmd+Right, and sends a plain delete for Cmd+Backspace, so the standard line-editing shortcuts did nothing useful. See #4759.
What changed
New key mapping in
apps/app/src/components/thread/terminal/terminal-mac-editing-keys.ts. On macOS the terminal now sends the control characters shells already bind to line and word editing:Hooked up in
ThreadTerminalView.tsxthrough xterm.js'sattachCustomKeyEventHandler, only when the platform is macOS. Every other key, and every other platform, still goes through xterm.js unchanged.No wire, CLI or doc changes.
Decisions
How you verified
ThreadTerminalView.test.tscover each mapped key, the key-up of a handled shortcut, and combinations that must be left to xterm.js.pnpm exec turbo run test --filter=@bb/app -- src/components/thread/terminal/ThreadTerminalView.test.tsreportedTests 44 passed (44).pnpm exec turbo run typecheck --filter=@bb/appreportedTasks: 3 successful, 3 total.pnpm exec turbo run lint --filter=@bb/apppassed.Fixes #4759
🤖 Generated with Claude Code