From bd46cf0f868293b501874c1f04632ced3bec7b81 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:56:46 -0500 Subject: feat(tui): configurable keybinds and mouse scroll --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5fa27d913..09ddb2675 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,49 @@ theme = "opencode" provider = "anthropic" model = "claude-sonnet-4-20250514" autoupdate = true + +keybinds.leader = "ctrl+x" +keybinds.session_new = "n" +keybinds.editor_open = "e" +``` + +#### Keybinds + +You can configure the keybinds in the global config file. (Note: values listed below are the defaults.) + +```toml +# ~/.config/opencode/config +keybinds.leader = "ctrl+x" +keybinds.help = "h" +keybinds.editor_open = "e" +keybinds.session_new = "n" +keybinds.session_list = "l" +keybinds.session_share = "s" +keybinds.session_interrupt = "esc" +keybinds.session_compact = "c" +keybinds.tool_details = "d" +keybinds.model_list = "m" +keybinds.theme_list = "t" +keybinds.project_init = "i" +keybinds.input_clear = "ctrl+c" +keybinds.input_paste = "ctrl+v" +keybinds.input_submit = "enter" +keybinds.input_newline = "shift+enter" +keybinds.history_previous = "up" +keybinds.history_next = "down" +keybinds.messages_page_up = "pgup" +keybinds.messages_page_down = "pgdown" +keybinds.messages_half_page_up = "ctrl+alt+u" +keybinds.messages_half_page_down = "ctrl+alt+d" +keybinds.messages_previous = "ctrl+alt+k" +keybinds.messages_next = "ctrl+alt+j" +keybinds.messages_first = "ctrl+g" +keybinds.messages_last = "ctrl+alt+g" +keybinds.app_exit = "ctrl+c,q" ``` +#### Models.dev + You can also extend the models.dev database with your own providers by mirroring the structure found [here](https://github.com/sst/models.dev/tree/dev/providers/anthropic) Start with a `provider.toml` file in `~/.config/opencode/providers` @@ -171,8 +212,7 @@ To run. ```bash $ bun install -$ cd packages/opencode -$ bun run src/index.ts +$ bun run packages/opencode/src/index.ts ``` ### FAQ -- cgit v1.2.3