Repository navigation
Conversation
The macOS input-source allowlist treated com.apple.keylayout. USInternational-PC as Option-as-Meta, so xterm's macOptionIsMeta turned on and every Option+letter keystroke became an invisible Esc+letter readline chord: Option+C never produced ç, Option+Shift+C never produced Ç. That layout is a composition layout like the ones issue stablyai#1205 already fixed. UCKeyTranslate against the shipped keylayout returns ç, Ç, å and a dead acute for Option+C, Option+Shift+C, Option+A and Option+E. It stayed in the allowlist only because Ghostty's list was copied verbatim, and choosing the International variant over plain US is itself a statement that accented input matters. Plain com.apple.keylayout.US remains the only allowlisted layout.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Drops
USInternational-PCfrom the Option-as-Meta allowlist —META_INPUT_SOURCE_IDSininput-source-id.tsnow holds onlycom.apple.keylayout.us, so the classifier returns'compose'for the International variant. The probe resolves that to'non-us',effectiveMacOptionAsAlt('auto', 'non-us')becomes'false',macOptionIsMetastays off, and macOS composesç/å/dead keys again. Verified the full path throughoption-as-alt-probe.ts:169→detect-option-as-alt.ts:106→terminal-appearance.ts:211. - Test pins the new behavior — the old
allowlists US International PC as metacase now asserts'compose', with theUCKeyTranslateevidence in the comment. This test would fail against the pre-PR allowlist, so it actually guards the change. - Comment updates in both files —
detect-option-as-alt.tsnow documents that the base-layer fingerprint cannot separate US / US-International / ABC and thatinput-source-id.tsis the narrowing authority;input-source-id.tsexplains why the International variant is deliberately excluded despite Ghostty allowlisting it.
Verified the readline compensation the PR claims: resolveTerminalOptionShortcutAction (terminal-option-shortcut-policy.ts:169-179) still emits \x1b + b/f/d for Option+B/F/D when Option is not Meta, so word-nav survives the flip. Repo-wide grep found no other reference to USInternational, and no test or config asserts the removed behavior.
openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change removes Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The narrow macOS keyboard-layout change restores Option-based character composition without affecting explicit settings or plain US behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
#21082) * fix(terminal): preserve Option-composed text in kitty panes Adapt the composition fix from #20579 and the input-source correction from #20164. Extend coverage to every Polish letter, live setting changes, associated text, and Chromium-to-PTY word entry. Co-authored-by: yu.xia <[email protected]> Co-authored-by: Alexandre Blause <[email protected]> * test: guard native Korean IME against background launch --------- Co-authored-by: yu.xia <[email protected]> Co-authored-by: Alexandre Blause <[email protected]>

ELI5
On the
U.S. International - PCkeyboard layout, pressing Option+C in an Orca terminal produced nothing at all. Noç, no error, no feedback. Same forÇ,å, and the dead-key accents.Orca had that layout on the list of keyboards where Option means Alt, so it turned every Option+letter into a readline chord instead of letting macOS compose the character. On a layout whose whole point is typing accented characters, that is the wrong end of the trade.
Problem
classifyInputSourceIdallowlists two input sources as Option-as-Meta:With the default
terminalMacOptionAsAlt: 'auto', the second entry sends US-International users down this path: classifier returns'meta'→effectiveMacOptionAsAltresolves to'true'→macOptionIsMetaturns on →resolveTerminalOptionShortcutActionemits\x1b+ the base character. In a shell, in Claude Code, in Codex CLI,Esc cis a no-op with no output, so the keystroke looks like it was dropped.This is #1205 again — Polish Pro, ABC, US Extended, all silently swallowed by the same mechanism — on a layout that fix did not cover.
The entry came from Ghostty's allowlist rather than from the layout itself. The shipped keylayout says the opposite;
UCKeyTranslateagainst the active input source:cçÇaåÅe´(dead)´n˜(dead)˜u¨(dead)¨That is a composition layer, structurally identical to the layouts already classified
compose. And unlike plainU.S., where the Option glyphs are incidental and nobody selected the layout for them, picking the International variant is itself the statement that accented input matters.Fix
Drop
com.apple.keylayout.usinternational-pcfrom the allowlist. Plaincom.apple.keylayout.USstays the only entry, so nothing changes for US users, who keep Option as Alt.The fingerprint probe in
detect-option-as-alt.tsis untouched:getLayoutMap()only exposes the base layer, which is identical across US, US-International and ABC, so it cannot separate them and still maps every US-shaped layout totrue.input-source-id.tsis what narrows that to plain US whenever macOS hands us a real input source ID, and it stays authoritative. Comments in both files now say which one decides what.Users who prefer the old behaviour set
Settings > Terminal > Option as AlttoBoth. Users on the fix keep Option+B / Option+F / Option+D word navigation regardless, sinceterminal-option-shortcut-policy.tssends those explicitly when Option is not Meta.Linked Issue
Fixes #20163
Visual Proof
N/A. The observable difference is one character appearing in a terminal where nothing appeared before, so a screenshot shows a
çwithout showing which keystroke produced it. The mechanical evidence is theUCKeyTranslatetable above andinput-source-id.test.ts, which pins the exact input source ID.Testing
macOS 26 (Darwin 25.6.0), Apple silicon, local execution host, input source
com.apple.keylayout.USInternational-PC,terminalMacOptionAsAltleft atauto.Manual, in a terminal pane on a dev build: Option+C →
ç, Option+Shift+C →Ç, Option+A →å, Option+E thene→é. Option+B / Option+F / Option+D still move by word, so the readline compensation survives the flip.pnpm test src/renderer/src/lib/keyboard-layout src/renderer/src/components/terminal-pane/terminal-shortcut-option-compose.test.ts src/renderer/src/components/terminal-pane/terminal-option-kitty-release.test.ts src/renderer/src/components/settings— 181 files, 1250 tests, all passpnpm tc— cleanpnpm run check:code-quality:changed— 0 new findings across 3 changed filesinput-source-id.test.tshad a case asserting the old behaviour; it now assertscomposefor that ID and carries the layout evidence as a comment, so the next person reading the allowlist does not re-add the entry from Ghostty's list.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
macOS-only code path, behind the existing
isMacguard. No wire format, no IPC shape, no persisted setting changed, so remote hosts and older clients are unaffected and the setting keeps its four explicit modes plusauto. Windows and Linux never reach this classifier. Anyone who had already set an explicitOption as Altvalue keeps it: onlyautoresolves differently, and only on this one input source.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)