aboutsummaryrefslogtreecommitdiff
path: root/docs/next
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-28 11:58:09 +0200
committerGitHub <noreply@github.com>2026-09-28 11:58:09 +0200
commit7f89b11a11160874ba89f3be7c64b29960bd2df3 (patch)
tree0e875b3fbbe5a701cfb0182bda0ce0994267584c /docs/next
parent0d5d6f1f317e238c8297076bc6ab5c3a0cd56283 (diff)
feat: support multiple prefix keys (#4653)
* feat: support multiple prefix keys keys.prefix accepts an array in addition to a single string so one config can define several prefix keys. Every configured prefix enters the same prefix mode, and the help panel lists them all. Published keybinding profiles keep the primary prefix as a scalar and carry the rest in an optional extra_prefixes field so older clients keep working with the primary prefix. * fix: reject an empty prefix list on reload An explicitly empty keys.prefix array now stays empty through config parsing so validation rejects it and a reload keeps the current keybindings instead of silently falling back to ctrl+b.
Diffstat (limited to 'docs/next')
-rw-r--r--docs/next/website/src/content/docs/configuration.mdx9
-rw-r--r--docs/next/website/src/data/config-reference.json4
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/next/website/src/content/docs/configuration.mdx b/docs/next/website/src/content/docs/configuration.mdx
index 1a0ce53c..33644e1c 100644
--- a/docs/next/website/src/content/docs/configuration.mdx
+++ b/docs/next/website/src/content/docs/configuration.mdx
@@ -142,6 +142,15 @@ navigate_pane_down = "ctrl+j"
split_horizontal = "prefix+minus"
```
+`keys.prefix` also accepts an array when you need to enter prefix mode from more than one key, for example to share one config between macOS and a remote Linux machine:
+
+```toml
+[keys]
+prefix = ["ctrl+space", "ctrl+s"]
+```
+
+Every configured prefix enters the same prefix mode and starts every `prefix+...` action. The first entry is the primary prefix shown in the status bar; the in-app help panel at `prefix+?` lists all of them.
+
The default keymap is prefix-first so Herdr does not steal input from shells, editors, tmux, or terminal apps. Search `keys.` in the [Config reference](/docs/config-reference/) to see every action and default binding. The in-app help panel at `prefix+?` shows the active bindings.
A binding may also be an array when one action needs multiple shortcuts:
diff --git a/docs/next/website/src/data/config-reference.json b/docs/next/website/src/data/config-reference.json
index 299c2ced..eb7e08d4 100644
--- a/docs/next/website/src/data/config-reference.json
+++ b/docs/next/website/src/data/config-reference.json
@@ -477,9 +477,9 @@
"keys": [
{
"key": "keys.prefix",
- "type": "string",
+ "type": "keybinding",
"default": "\"ctrl+b\"",
- "description": "Prefix key to enter prefix mode (e.g. \"ctrl+b\", \"f12\", \"esc\")."
+ "description": "Prefix key(s) to enter prefix mode (e.g. \"ctrl+b\", \"f12\", \"esc\", or an array to accept several)."
},
{
"key": "keys.help",