Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): support Shift+Insert terminal paste #5982

Mergedaoright(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5982/headmerged by juliusmarminge View on GitHub

What Changed

  • Recognize exact Shift+Insert key presses as terminal paste shortcuts on non-macOS platforms.
  • Reuse the existing clipboard-read/native-paste race and Ghostty bracketed-paste encoding path.
  • Add regression coverage for Shift+Insert, plain Insert, modifier conflicts, and macOS behavior.

Why

The integrated terminal only recognized Cmd+V and Ctrl+Shift+V. Linux desktop tools such as Omarchy's universal paste binding emit Shift+Insert, so those paste actions were silently ignored. Keeping this inside isTerminalPasteShortcut makes the existing paste pipeline handle the additional conventional shortcut without changing normal Insert or macOS behavior.

Closes #5936.

UI Changes

This is a keyboard interaction change with no layout or visual-state difference. The behavior is covered by the focused shortcut regression test; no before/after screenshot applies.

Verification

  • vp test run apps/web/src/terminal/ghostty/surface.test.ts (35 passed)
  • vp lint --report-unused-disable-directives apps/web/src/terminal/ghostty/surface.ts apps/web/src/terminal/ghostty/surface.test.ts
  • vp fmt --check apps/web/src/terminal/ghostty/surface.ts apps/web/src/terminal/ghostty/surface.test.ts
  • vp run --filter @t3tools/web typecheck

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (not applicable: no visual change)
  • I included a video for animation/interaction changes

Model: GPT-5. Harness: Codex desktop.

Note

Add Shift+Insert paste shortcut support to terminal on non-macOS platforms

Updates isTerminalPasteShortcut in surface.ts to recognize Shift+Insert as a paste shortcut on non-macOS platforms, matching conventional terminal behavior. Plain Insert, Ctrl+Shift+Insert, and Shift+Insert on macOS all continue to return false. Existing Ctrl+Shift+V (Linux/Windows) and Meta+V (macOS) shortcuts are unchanged.

Macroscope summarized 2746139.

Note

Low Risk Small change to keyboard shortcut detection only; existing paste encoding and platform rules for V-based shortcuts are unchanged.

Overview Shift+Insert is now treated as paste on non-macOS in isTerminalPasteShortcut, so Linux-style bindings (e.g. Omarchy) hit the same clipboard-read / native-paste path as Ctrl+Shift+V and Cmd+V.

Only Shift+Insert with no Ctrl/Meta counts; plain Insert, Ctrl+Shift+Insert, and Shift+Insert on macOS stay non-paste. Regression tests cover those cases.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 2746139883df716929f5c77b7f20b551b5e387a8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: a95d1225-20ed-4e9b-bcc2-af51cf968fc8

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved 2746139

      Simple keyboard shortcut addition for Shift+Insert paste on non-Mac platforms. The change is self-contained within a utility function with comprehensive test coverage, and follows existing code patterns.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged thisb0de385

    5. juliusmarminge closed this

Sign in to join this conversation.