Skip to content

Commit c12be73

Browse files
committed
align default input keybinds
1 parent de6fb31 commit c12be73

File tree

2 files changed

+40
-24
lines changed

2 files changed

+40
-24
lines changed

packages/opencode/src/config/config.ts

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -481,19 +481,23 @@ export namespace Config {
481481
input_select_down: z.string().optional().default("shift+down").describe("Select down in input"),
482482
input_line_home: z.string().optional().default("ctrl+a").describe("Move to start of line in input"),
483483
input_line_end: z.string().optional().default("ctrl+e").describe("Move to end of line in input"),
484-
input_select_line_home: z.string().optional().default("none").describe("Select to start of line in input"),
485-
input_select_line_end: z.string().optional().default("none").describe("Select to end of line in input"),
486-
input_visual_line_home: z.string().optional().default("none").describe("Move to start of visual line in input"),
487-
input_visual_line_end: z.string().optional().default("none").describe("Move to end of visual line in input"),
484+
input_select_line_home: z
485+
.string()
486+
.optional()
487+
.default("ctrl+shift+a")
488+
.describe("Select to start of line in input"),
489+
input_select_line_end: z.string().optional().default("ctrl+shift+e").describe("Select to end of line in input"),
490+
input_visual_line_home: z.string().optional().default("alt+a").describe("Move to start of visual line in input"),
491+
input_visual_line_end: z.string().optional().default("alt+e").describe("Move to end of visual line in input"),
488492
input_select_visual_line_home: z
489493
.string()
490494
.optional()
491-
.default("none")
495+
.default("alt+shift+a")
492496
.describe("Select to start of visual line in input"),
493497
input_select_visual_line_end: z
494498
.string()
495499
.optional()
496-
.default("none")
500+
.default("alt+shift+e")
497501
.describe("Select to end of visual line in input"),
498502
input_buffer_home: z.string().optional().default("home").describe("Move to start of buffer in input"),
499503
input_buffer_end: z.string().optional().default("end").describe("Move to end of buffer in input"),
@@ -503,15 +507,23 @@ export namespace Config {
503507
.default("shift+home")
504508
.describe("Select to start of buffer in input"),
505509
input_select_buffer_end: z.string().optional().default("shift+end").describe("Select to end of buffer in input"),
506-
input_delete_line: z.string().optional().default("alt+d").describe("Delete line in input"),
510+
input_delete_line: z.string().optional().default("ctrl+shift+d").describe("Delete line in input"),
507511
input_delete_to_line_end: z.string().optional().default("ctrl+k").describe("Delete to end of line in input"),
508512
input_delete_to_line_start: z.string().optional().default("ctrl+u").describe("Delete to start of line in input"),
509513
input_backspace: z.string().optional().default("backspace,shift+backspace").describe("Backspace in input"),
510-
input_delete: z.string().optional().default("delete,shift+delete").describe("Delete character in input"),
514+
input_delete: z.string().optional().default("ctrl+d,delete,shift+delete").describe("Delete character in input"),
511515
input_undo: z.string().optional().default("ctrl+-,cmd+z").describe("Undo in input"),
512516
input_redo: z.string().optional().default("ctrl+.,cmd+shift+z").describe("Redo in input"),
513-
input_word_forward: z.string().optional().default("alt+f,alt+right").describe("Move word forward in input"),
514-
input_word_backward: z.string().optional().default("alt+b,alt+left").describe("Move word backward in input"),
517+
input_word_forward: z
518+
.string()
519+
.optional()
520+
.default("alt+f,alt+right,ctrl+right")
521+
.describe("Move word forward in input"),
522+
input_word_backward: z
523+
.string()
524+
.optional()
525+
.default("alt+b,alt+left,ctrl+left")
526+
.describe("Move word backward in input"),
515527
input_select_word_forward: z
516528
.string()
517529
.optional()
@@ -522,11 +534,15 @@ export namespace Config {
522534
.optional()
523535
.default("alt+shift+b,alt+shift+left")
524536
.describe("Select word backward in input"),
525-
input_delete_word_forward: z.string().optional().default("ctrl+d").describe("Delete word forward in input"),
537+
input_delete_word_forward: z
538+
.string()
539+
.optional()
540+
.default("alt+d,alt+delete,ctrl+delete")
541+
.describe("Delete word forward in input"),
526542
input_delete_word_backward: z
527543
.string()
528544
.optional()
529-
.default("ctrl+w,alt+backspace")
545+
.default("ctrl+w,ctrl+backspace,alt+backspace")
530546
.describe("Delete word backward in input"),
531547
history_previous: z.string().optional().default("up").describe("Previous history item"),
532548
history_next: z.string().optional().default("down").describe("Next history item"),

packages/web/src/content/docs/keybinds.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,29 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
5858
"input_select_down": "shift+down",
5959
"input_line_home": "ctrl+a",
6060
"input_line_end": "ctrl+e",
61-
"input_select_line_home": "none",
62-
"input_select_line_end": "none",
63-
"input_visual_line_home": "none",
64-
"input_visual_line_end": "none",
65-
"input_select_visual_line_home": "none",
66-
"input_select_visual_line_end": "none",
61+
"input_select_line_home": "ctrl+shift+a",
62+
"input_select_line_end": "ctrl+shift+e",
63+
"input_visual_line_home": "alt+a",
64+
"input_visual_line_end": "alt+e",
65+
"input_select_visual_line_home": "alt+shift+a",
66+
"input_select_visual_line_end": "alt+shift+e",
6767
"input_buffer_home": "home",
6868
"input_buffer_end": "end",
6969
"input_select_buffer_home": "shift+home",
7070
"input_select_buffer_end": "shift+end",
71-
"input_delete_line": "alt+d",
71+
"input_delete_line": "ctrl+shift+d",
7272
"input_delete_to_line_end": "ctrl+k",
7373
"input_delete_to_line_start": "ctrl+u",
7474
"input_backspace": "backspace,shift+backspace",
75-
"input_delete": "delete,shift+delete",
75+
"input_delete": "ctrl+d,delete,shift+delete",
7676
"input_undo": "ctrl+-,cmd+z",
7777
"input_redo": "ctrl+.,cmd+shift+z",
78-
"input_word_forward": "alt+f,alt+right",
79-
"input_word_backward": "alt+b,alt+left",
78+
"input_word_forward": "alt+f,alt+right,ctrl+right",
79+
"input_word_backward": "alt+b,alt+left,ctrl+left",
8080
"input_select_word_forward": "alt+shift+f,alt+shift+right",
8181
"input_select_word_backward": "alt+shift+b,alt+shift+left",
82-
"input_delete_word_forward": "ctrl+d",
83-
"input_delete_word_backward": "ctrl+w,alt+backspace",
82+
"input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
83+
"input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
8484
"history_previous": "up",
8585
"history_next": "down",
8686
"terminal_suspend": "ctrl+z"

0 commit comments

Comments
 (0)