fix: paste-as-text shortcut on non-Latin layouts #13411
main fromrefs/pull/13411/head·opened View on GitHubThe large-paste toast says "Use Ctrl+Shift+V to keep a large paste inline", but on a Cyrillic or Greek layout that shortcut does nothing: isPasteAsTextShortcut compared event.key to "v", and there event.key is "М". The paste still gets folded into a pasted-text.txt attachment.
It now falls back to the physical key (code: "KeyV") when the layout types a non-Latin letter, the same rule the keybinding matcher uses (resolveEventKeys in packages/shared/src/keybindings.ts). Latin layouts still follow the letter they type, so a Dvorak or Colemak user's Ctrl+Shift+V keeps working and the key in the V position is not claimed.
This is a small fix for an obvious bug (the app recommends a shortcut that cannot work on these layouts), so it goes under the small-fix exception in CONTRIBUTING rather than a prior issue.
Verification#
Web dev server (vp run dev) from a worktree at main 3982f20ce4, Windows 10, isolated .t3 state, headless Edge at 1100×700. A 39 KB build log on the clipboard (over the 32 KB attachment line). The keys go in through CDP Input.dispatchKeyEvent with exactly what a Russian layout reports for that key (key: "М" Cyrillic, code: "KeyV", virtual key 86), then the same chord with key: "V" for an English layout. After each paste the script read the composer back.
| Russian layout, Ctrl+Shift+V | English layout, Ctrl+Shift+V | |
|---|---|---|
| main | pasted-text.txt attachment, toast recommends Ctrl+Shift+V | inline, 40,905 characters |
| fix | inline, 40,905 characters | inline, 40,905 characters |
vp test run src/textPaste.test.tsinpackages/client-runtime: with main'stextPaste.tsthe new case fails (1 failed, 12 passed); with the fix, 13 passed. The case also pins that a Latin layout typingkon theKeyVkey is not treated as V.- On current main
67c0fc0cda,textPaste.tsis unchanged; the composer's paste handler moved withinChatComposer.tsxbut still arms the bypass from the same keydown check. The branch still merges cleanly.
Not checked: macOS (Cmd+Shift+V goes through the same function, untested), the Electron shell, and mobile, which does not use this shortcut.
Before (main 3982f20ce4), recording: paste-before.mp4

After (with this fix), recording: paste-after.mp4

Model and harness#
Claude Opus 5.5 (high effort) in Claude Code, run from T3 Code.
Summary by CodeRabbit#
- Bug Fixes
- Paste-as-text shortcuts now work with non-Latin keyboard layouts by recognizing the physical V key. Latin letter keys remain excluded.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
40dfdd8Macroscope's review found this PR approvable — This is a small, localized fix to an existing paste shortcut, with tests covering non-Latin layouts and preserving Latin-layout behavior. It introduces no schema, deployment, security, default, or static-analysis changes.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Note
This comment is posted by Julius' dot
Closing for missing verification. This changes paste-as-text handling on non-Latin layouts, but there is no reported test run or observed after-check. Add the focused command and result, plus before/after interaction evidence showing a large paste stays inline and Latin shortcuts still work. See verification. Add the evidence and request reconsideration.
juliusmarminge closed this
Added the test run and before/after recordings the closure asked for: a paste over 32 KB with Ctrl+Shift+V on a Russian layout (main attaches it as
pasted-text.txt; the fix keeps it inline) and on an English layout (inline in both, so Latin shortcuts still work). Commands, results and what was not checked are in the description under Verification. The bug is still on main67c0fc0cdaand the branch merges cleanly. Requesting reconsideration.Replaced by #28470, the same fix rebuilt on current main with a fresh test run and recordings.
Sign in to join this conversation.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
c6e8defd-5ff2-40b6-9437-825d532b819e📥 Commits
Reviewing files that changed from the base of the PR and between b2b43bef73447c483ceae486890cb79f01c369cb and 40dfdd83a3975098d421c1cac7b9ae942ba9257d.
📒 Files selected for processing (2)
packages/client-runtime/src/textPaste.test.tspackages/client-runtime/src/textPaste.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough#
The paste-as-text shortcut check now uses the physical V key code when the reported key is not an ASCII letter. Tests cover non-Latin and Latin keyboard layouts.
Changes#
Paste-as-text shortcut
packages/client-runtime/src/textPaste.ts,packages/client-runtime/src/textPaste.test.tscodevalue and usesKeyVwhen the reported key is not an ASCII letter. Tests cover non-Latin and Latin key values.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
chrisdeemingMerge Risk: ⚪ Minimal · up to
40dfdThe non-Latin shortcut reaches both paste paths, and no remaining issue in the reviewed change warrants delaying merge.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.