the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix: preserve prefix mode for modifier events
Ogulcan Celik19cd372f2544
diff --git a/src/app/input/navigate.rs b/src/app/input/navigate.rsindex 6b5780916..4cb2a4e19 100644--- a/src/app/input/navigate.rs+++ b/src/app/input/navigate.rs@@ -61,6 +61,10 @@ impl App {let key = raw_key.as_key_event();self.state.update_dismissed = true;+ if matches!(key.code, KeyCode::Modifier(_)) {+ return;+ }+if self.state.is_prefix_key(raw_key) {if self.state.copy_mode_pane_is_focused() {self.state.cancel_copy_mode(&self.terminal_runtimes);@@ -1867,7 +1871,7 @@ mod tests {#[cfg(unix)]use std::time::Duration;- use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};+ use crossterm::event::{KeyCode, KeyEvent, KeyModifiers, ModifierKeyCode};use ratatui::layout::Direction;#[cfg(unix)]@@ -2621,6 +2625,30 @@ last_pane = "prefix+tab"}}+ #[test]+ fn prefix_shift_indexed_workspace_shortcut_survives_modifier_press() {+ let mut app = app_with_test_workspaces(&["one", "two"]);+ let config: Config =+ toml::from_str("[keys]\nswitch_workspace = \"prefix+shift+1..9\"\n").unwrap();+ app.state.keybinds.switch_workspace = config.keybinds().switch_workspace;+ app.state.mode = Mode::Prefix;++ app.handle_prefix_key(TerminalKey::new(+ KeyCode::Modifier(ModifierKeyCode::LeftShift),+ KeyModifiers::SHIFT,+ ));++ assert_eq!(app.state.mode, Mode::Prefix);++ app.handle_prefix_key(+ TerminalKey::new(KeyCode::Char('2'), KeyModifiers::SHIFT)+ .with_shifted_codepoint('"' as u32),+ );++ assert_eq!(app.state.active, Some(1));+ assert_eq!(app.state.mode, Mode::Terminal);+ }+#[test]fn prefix_unshifted_indexed_shortcut_maps_shifted_french_number_row() {let mut state = state_with_workspaces(&["one"]);