From 76752cab3ea6baa3f4ace514243865bb22648cc3 Mon Sep 17 00:00:00 2001 From: Noitidart Date: Fri, 15 May 2026 08:31:18 -0700 Subject: [PATCH] fix(tui): make hotkeys and numpad work again in IDE while focus is in TUI VS Code's terminal does not support the Kitty keyboard protocol (microsoft/vscode#286809 was closed), so enabling it has no benefit and triggers a shortcut dispatch bug where IDE keybindings like Cmd+Shift+E and Ctrl+Shift+G stop forwarding while the TUI has focus (microsoft/vscode#304806). It also triggers a Chromium regression where numpad keys are reported as "Unidentified" when Kitty protocol is active, causing them to be silently dropped (microsoft/vscode#299374). Detect VS Code's terminal via TERM_PROGRAM=vscode (also set by Cursor and Windsurf) and pass false to useKittyKeyboard to prevent the protocol from being activated. No functionality is lost since VS Code's terminal never supported Kitty to begin with. Fixes #27006 Fixes #16100 --- packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts | 3 ++- packages/opencode/src/cli/cmd/tui/app.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts b/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts index eb342a7fda28..b2c5390fdc9a 100644 --- a/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts +++ b/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts @@ -179,7 +179,8 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise