From eb2e244a267e80f388d3a4e68dd40945f6c74726 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:16:53 +1000 Subject: [PATCH] fix(tui): revert kitty keyboard events workaround on windows --- packages/opencode/src/cli/cmd/tui/app.tsx | 2 +- .../src/cli/cmd/tui/component/prompt/index.tsx | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 3e4d0b42707f..08dccbfb11e9 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -128,7 +128,7 @@ function rendererConfig(_config: TuiConfig.Info): CliRendererConfig { targetFps: 60, gatherStats: false, exitOnCtrlC: false, - useKittyKeyboard: { events: process.platform === "win32" }, + useKittyKeyboard: {}, autoFocus: false, openConsoleOnError: false, consoleOptions: { diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 96563b884ede..8eb42802ff3f 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -18,7 +18,7 @@ import { usePromptStash } from "./stash" import { DialogStash } from "../dialog-stash" import { type AutocompleteRef, Autocomplete } from "./autocomplete" import { useCommandDialog } from "../dialog-command" -import { useKeyboard, useRenderer } from "@opentui/solid" +import { useRenderer } from "@opentui/solid" import { Editor } from "@tui/util/editor" import { useExit } from "../../context/exit" import { Clipboard } from "../../util/clipboard" @@ -388,20 +388,6 @@ export function Prompt(props: PromptProps) { ] }) - // Windows Terminal 1.25+ handles Ctrl+V on keydown when kitty events are - // enabled, but still reports the kitty key-release event. Probe on release. - if (process.platform === "win32") { - useKeyboard( - (evt) => { - if (!input.focused) return - if (evt.name === "v" && evt.ctrl && evt.eventType === "release") { - command.trigger("prompt.paste") - } - }, - { release: true }, - ) - } - const ref: PromptRef = { get focused() { return input.focused