Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(web): support Shift+Insert terminal paste (#5982)
aorightb0de3857775b
diff --git a/apps/web/src/terminal/ghostty/surface.test.ts b/apps/web/src/terminal/ghostty/surface.test.tsindex 18cf95901..c11529e0c 100644--- a/apps/web/src/terminal/ghostty/surface.test.ts+++ b/apps/web/src/terminal/ghostty/surface.test.ts@@ -253,6 +253,22 @@ describe("isTerminalPasteShortcut", () => {true,);});++ it("supports the conventional Shift+Insert paste shortcut", () => {+ expect(isTerminalPasteShortcut(event({ key: "Insert", shiftKey: true }), "Linux x86_64")).toBe(+ true,+ );+ expect(isTerminalPasteShortcut(event({ key: "Insert" }), "Linux x86_64")).toBe(false);+ expect(+ isTerminalPasteShortcut(+ event({ key: "Insert", ctrlKey: true, shiftKey: true }),+ "Linux x86_64",+ ),+ ).toBe(false);+ expect(isTerminalPasteShortcut(event({ key: "Insert", shiftKey: true }), "MacIntel")).toBe(+ false,+ );+ });});describe("isTerminalCompositionCommitInput", () => {diff --git a/apps/web/src/terminal/ghostty/surface.ts b/apps/web/src/terminal/ghostty/surface.tsindex 2ac3c68d1..9492e2d02 100644--- a/apps/web/src/terminal/ghostty/surface.ts+++ b/apps/web/src/terminal/ghostty/surface.ts@@ -340,7 +340,11 @@ export function isTerminalPasteShortcut(event: Pick<KeyboardEvent, "ctrlKey" | "key" | "metaKey" | "shiftKey">,platform = navigator.platform,) {- if (event.key.toLowerCase() !== "v") return false;+ const key = event.key.toLowerCase();+ if (key === "insert" && !isMacPlatform(platform)) {+ return event.shiftKey && !event.ctrlKey && !event.metaKey;+ }+ if (key !== "v") return false;return isMacPlatform(platform) ? event.metaKey : event.ctrlKey && event.shiftKey;}