From baed581a7cb754a80cd5fa39b91ad1fb90c460bf Mon Sep 17 00:00:00 2001 From: Sebastian Herrlinger Date: Tue, 9 Dec 2025 22:57:11 +0100 Subject: [PATCH] remove input_forward_delete special handling --- .../src/cli/cmd/tui/component/prompt/index.tsx | 11 ----------- packages/opencode/src/config/config.ts | 1 - packages/web/src/content/docs/keybinds.mdx | 1 - 3 files changed, 13 deletions(-) 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 2fd4967a0..868be296f 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -688,17 +688,6 @@ export function Prompt(props: PromptProps) { setStore("extmarkToPartIndex", new Map()) return } - if (keybind.match("input_forward_delete", e) && store.prompt.input !== "") { - const cursorOffset = input.cursorOffset - if (cursorOffset < input.plainText.length) { - const text = input.plainText - const newText = text.slice(0, cursorOffset) + text.slice(cursorOffset + 1) - input.setText(newText) - input.cursorOffset = cursorOffset - } - e.preventDefault() - return - } if (keybind.match("app_exit", e)) { await exit() return diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 267278b74..34e3eea79 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -464,7 +464,6 @@ export namespace Config { agent_cycle: z.string().optional().default("tab").describe("Next agent"), agent_cycle_reverse: z.string().optional().default("shift+tab").describe("Previous agent"), input_clear: z.string().optional().default("ctrl+c").describe("Clear input field"), - input_forward_delete: z.string().optional().default("ctrl+d").describe("Forward delete"), input_paste: z.string().optional().default("ctrl+v").describe("Paste from clipboard"), input_submit: z.string().optional().default("return").describe("Submit input"), input_newline: z.string().optional().default("shift+return,ctrl+j").describe("Insert newline in input"), diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx index a32756e18..36b51c68d 100644 --- a/packages/web/src/content/docs/keybinds.mdx +++ b/packages/web/src/content/docs/keybinds.mdx @@ -45,7 +45,6 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf "agent_cycle": "tab", "agent_cycle_reverse": "shift+tab", "input_clear": "ctrl+c", - "input_forward_delete": "ctrl+d", "input_paste": "ctrl+v", "input_submit": "enter", "input_newline": "shift+enter,ctrl+j",