aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
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 /src/app/state.rs
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 'src/app/state.rs')
-rw-r--r--src/app/state.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index 892ec5e9..65c06a6c 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -820,8 +820,7 @@ pub struct AppState {
/// None means unsupported or not yet reported, which preserves active-pane suppression.
pub outer_terminal_focus: Option<bool>,
// Config
- pub prefix_code: KeyCode,
- pub prefix_mods: KeyModifiers,
+ pub prefix_keys: Vec<(KeyCode, KeyModifiers)>,
/// Virtual terminal size (columns, rows) used when no client is attached.
pub(crate) headless_size: (u16, u16),
pub agent_panel_sort: AgentPanelSort,
@@ -1046,8 +1045,7 @@ impl AppState {
toast: None,
pending_agent_notifications: std::collections::HashMap::new(),
outer_terminal_focus: None,
- prefix_code: KeyCode::Char('b'),
- prefix_mods: KeyModifiers::CONTROL,
+ prefix_keys: vec![(KeyCode::Char('b'), KeyModifiers::CONTROL)],
headless_size: (
crate::config::DEFAULT_HEADLESS_COLS,
crate::config::DEFAULT_HEADLESS_ROWS,