summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSebastian Herrlinger <[email protected]>2025-12-11 17:39:19 +0100
committerSebastian Herrlinger <[email protected]>2025-12-11 17:39:29 +0100
commitc12be73bf7fcea92fa5ac59d2f3f9200f7db07f1 (patch)
tree2e04264b3ca1054b0b7585b311fa6cc7aa644c27
parentde6fb3126c423011e9fcd049366e18920f9ed8d9 (diff)
downloadopencode-c12be73bf7fcea92fa5ac59d2f3f9200f7db07f1.tar.gz
opencode-c12be73bf7fcea92fa5ac59d2f3f9200f7db07f1.zip
align default input keybinds
-rw-r--r--packages/opencode/src/config/config.ts40
-rw-r--r--packages/web/src/content/docs/keybinds.mdx24
2 files changed, 40 insertions, 24 deletions
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 85f5b4409..eb13963c8 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -481,19 +481,23 @@ export namespace Config {
input_select_down: z.string().optional().default("shift+down").describe("Select down in input"),
input_line_home: z.string().optional().default("ctrl+a").describe("Move to start of line in input"),
input_line_end: z.string().optional().default("ctrl+e").describe("Move to end of line in input"),
- input_select_line_home: z.string().optional().default("none").describe("Select to start of line in input"),
- input_select_line_end: z.string().optional().default("none").describe("Select to end of line in input"),
- input_visual_line_home: z.string().optional().default("none").describe("Move to start of visual line in input"),
- input_visual_line_end: z.string().optional().default("none").describe("Move to end of visual line in input"),
+ input_select_line_home: z
+ .string()
+ .optional()
+ .default("ctrl+shift+a")
+ .describe("Select to start of line in input"),
+ input_select_line_end: z.string().optional().default("ctrl+shift+e").describe("Select to end of line in input"),
+ input_visual_line_home: z.string().optional().default("alt+a").describe("Move to start of visual line in input"),
+ input_visual_line_end: z.string().optional().default("alt+e").describe("Move to end of visual line in input"),
input_select_visual_line_home: z
.string()
.optional()
- .default("none")
+ .default("alt+shift+a")
.describe("Select to start of visual line in input"),
input_select_visual_line_end: z
.string()
.optional()
- .default("none")
+ .default("alt+shift+e")
.describe("Select to end of visual line in input"),
input_buffer_home: z.string().optional().default("home").describe("Move to start of buffer in input"),
input_buffer_end: z.string().optional().default("end").describe("Move to end of buffer in input"),
@@ -503,15 +507,23 @@ export namespace Config {
.default("shift+home")
.describe("Select to start of buffer in input"),
input_select_buffer_end: z.string().optional().default("shift+end").describe("Select to end of buffer in input"),
- input_delete_line: z.string().optional().default("alt+d").describe("Delete line in input"),
+ input_delete_line: z.string().optional().default("ctrl+shift+d").describe("Delete line in input"),
input_delete_to_line_end: z.string().optional().default("ctrl+k").describe("Delete to end of line in input"),
input_delete_to_line_start: z.string().optional().default("ctrl+u").describe("Delete to start of line in input"),
input_backspace: z.string().optional().default("backspace,shift+backspace").describe("Backspace in input"),
- input_delete: z.string().optional().default("delete,shift+delete").describe("Delete character in input"),
+ input_delete: z.string().optional().default("ctrl+d,delete,shift+delete").describe("Delete character in input"),
input_undo: z.string().optional().default("ctrl+-,cmd+z").describe("Undo in input"),
input_redo: z.string().optional().default("ctrl+.,cmd+shift+z").describe("Redo in input"),
- input_word_forward: z.string().optional().default("alt+f,alt+right").describe("Move word forward in input"),
- input_word_backward: z.string().optional().default("alt+b,alt+left").describe("Move word backward in input"),
+ input_word_forward: z
+ .string()
+ .optional()
+ .default("alt+f,alt+right,ctrl+right")
+ .describe("Move word forward in input"),
+ input_word_backward: z
+ .string()
+ .optional()
+ .default("alt+b,alt+left,ctrl+left")
+ .describe("Move word backward in input"),
input_select_word_forward: z
.string()
.optional()
@@ -522,11 +534,15 @@ export namespace Config {
.optional()
.default("alt+shift+b,alt+shift+left")
.describe("Select word backward in input"),
- input_delete_word_forward: z.string().optional().default("ctrl+d").describe("Delete word forward in input"),
+ input_delete_word_forward: z
+ .string()
+ .optional()
+ .default("alt+d,alt+delete,ctrl+delete")
+ .describe("Delete word forward in input"),
input_delete_word_backward: z
.string()
.optional()
- .default("ctrl+w,alt+backspace")
+ .default("ctrl+w,ctrl+backspace,alt+backspace")
.describe("Delete word backward in input"),
history_previous: z.string().optional().default("up").describe("Previous history item"),
history_next: z.string().optional().default("down").describe("Next history item"),
diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx
index 67e53c455..273ecf524 100644
--- a/packages/web/src/content/docs/keybinds.mdx
+++ b/packages/web/src/content/docs/keybinds.mdx
@@ -58,29 +58,29 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
"input_select_down": "shift+down",
"input_line_home": "ctrl+a",
"input_line_end": "ctrl+e",
- "input_select_line_home": "none",
- "input_select_line_end": "none",
- "input_visual_line_home": "none",
- "input_visual_line_end": "none",
- "input_select_visual_line_home": "none",
- "input_select_visual_line_end": "none",
+ "input_select_line_home": "ctrl+shift+a",
+ "input_select_line_end": "ctrl+shift+e",
+ "input_visual_line_home": "alt+a",
+ "input_visual_line_end": "alt+e",
+ "input_select_visual_line_home": "alt+shift+a",
+ "input_select_visual_line_end": "alt+shift+e",
"input_buffer_home": "home",
"input_buffer_end": "end",
"input_select_buffer_home": "shift+home",
"input_select_buffer_end": "shift+end",
- "input_delete_line": "alt+d",
+ "input_delete_line": "ctrl+shift+d",
"input_delete_to_line_end": "ctrl+k",
"input_delete_to_line_start": "ctrl+u",
"input_backspace": "backspace,shift+backspace",
- "input_delete": "delete,shift+delete",
+ "input_delete": "ctrl+d,delete,shift+delete",
"input_undo": "ctrl+-,cmd+z",
"input_redo": "ctrl+.,cmd+shift+z",
- "input_word_forward": "alt+f,alt+right",
- "input_word_backward": "alt+b,alt+left",
+ "input_word_forward": "alt+f,alt+right,ctrl+right",
+ "input_word_backward": "alt+b,alt+left,ctrl+left",
"input_select_word_forward": "alt+shift+f,alt+shift+right",
"input_select_word_backward": "alt+shift+b,alt+shift+left",
- "input_delete_word_forward": "ctrl+d",
- "input_delete_word_backward": "ctrl+w,alt+backspace",
+ "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
+ "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
"history_previous": "up",
"history_next": "down",
"terminal_suspend": "ctrl+z"