diff options
| author | Aram Drevekenin <aram@poor.dev> | 2025-09-24 12:56:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 12:56:56 +0200 |
| commit | 533140831d825829afaf864d940c435056788d3e (patch) | |
| tree | 9fe6b7da3955663c8373776499f85addfd044d40 /zellij-utils/src/input/keybinds.rs | |
| parent | refactor(client-server-contract): config + layout (#4383) (diff) | |
| download | sl0ppij-533140831d825829afaf864d940c435056788d3e.tar.gz sl0ppij-533140831d825829afaf864d940c435056788d3e.tar.xz sl0ppij-533140831d825829afaf864d940c435056788d3e.zip | |
fix(ipc): make sessions compatible between versions (#4439)
* translate ipc tuple enum variants to struct enum variants
* initial client/server contract
* tests and missing types
* migrate web server and remove rmp_serde
* change socket folder
* fix crash on unknown messages
* fix client logout on unknown message
* fix web client logout on unknown message
* rustfmt
* add comment and change log level
* address compilation warnings
* style(fmt): rustfmt
* fix plugin system test assertions
* add pr
Diffstat (limited to 'zellij-utils/src/input/keybinds.rs')
| -rw-r--r-- | zellij-utils/src/input/keybinds.rs | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs index 3da34e4b..c3943182 100644 --- a/zellij-utils/src/input/keybinds.rs +++ b/zellij-utils/src/input/keybinds.rs @@ -76,15 +76,19 @@ impl Keybinds { key_is_kitty_protocol: bool, ) -> Action { match *mode { - InputMode::Locked => { - Action::Write(key_with_modifier.cloned(), raw_bytes, key_is_kitty_protocol) + InputMode::Locked => Action::Write { + key_with_modifier: key_with_modifier.cloned(), + bytes: raw_bytes, + is_kitty_keyboard_protocol: key_is_kitty_protocol, }, - mode if mode == default_input_mode => { - Action::Write(key_with_modifier.cloned(), raw_bytes, key_is_kitty_protocol) + mode if mode == default_input_mode => Action::Write { + key_with_modifier: key_with_modifier.cloned(), + bytes: raw_bytes, + is_kitty_keyboard_protocol: key_is_kitty_protocol, }, - InputMode::RenameTab => Action::TabNameInput(raw_bytes), - InputMode::RenamePane => Action::PaneNameInput(raw_bytes), - InputMode::EnterSearch => Action::SearchInput(raw_bytes), + InputMode::RenameTab => Action::TabNameInput { input: raw_bytes }, + InputMode::RenamePane => Action::PaneNameInput { input: raw_bytes }, + InputMode::EnterSearch => Action::SearchInput { input: raw_bytes }, _ => Action::NoOp, } } @@ -124,11 +128,11 @@ fn handle_ctrl_j( if mode_keybindings.get(&ctrl_j).is_some() { mode_keybindings.get(&ctrl_j).cloned() } else { - Some(vec![Action::Write( - Some(ctrl_j), - raw_bytes.to_vec().clone(), - key_is_kitty_protocol, - )]) + Some(vec![Action::Write { + key_with_modifier: Some(ctrl_j), + bytes: raw_bytes.to_vec().clone(), + is_kitty_keyboard_protocol: key_is_kitty_protocol, + }]) } } |
