diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-10-31 16:49:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 16:49:48 +0100 |
| commit | 72f6b502d1bf544a2087f960e08a00af5d1e63a4 (patch) | |
| tree | 1e20bf27f79f801d65f21b676fe2f67026afcfca /zellij-utils/src/input/keybinds.rs | |
| parent | docs(changelog): configuration fixes (diff) | |
| download | sl0ppij-72f6b502d1bf544a2087f960e08a00af5d1e63a4.tar.gz sl0ppij-72f6b502d1bf544a2087f960e08a00af5d1e63a4.tar.xz sl0ppij-72f6b502d1bf544a2087f960e08a00af5d1e63a4.zip | |
fix(ux): forward keys to pane in locked mode and base mode rather than hard-coded normal mode (#3715)
* fix(keybindings): only forward clear keys in locked mode and default mode
* style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/input/keybinds.rs')
| -rw-r--r-- | zellij-utils/src/input/keybinds.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs index af923056..99ec0992 100644 --- a/zellij-utils/src/input/keybinds.rs +++ b/zellij-utils/src/input/keybinds.rs @@ -39,6 +39,7 @@ impl Keybinds { mode: &InputMode, key_with_modifier: &KeyWithModifier, raw_bytes: Vec<u8>, + default_input_mode: InputMode, key_is_kitty_protocol: bool, ) -> Vec<Action> { self.0 @@ -50,6 +51,7 @@ impl Keybinds { mode, Some(key_with_modifier), raw_bytes, + default_input_mode, key_is_kitty_protocol, )] }) @@ -65,10 +67,14 @@ impl Keybinds { mode: &InputMode, key_with_modifier: Option<&KeyWithModifier>, raw_bytes: Vec<u8>, + default_input_mode: InputMode, key_is_kitty_protocol: bool, ) -> Action { match *mode { - InputMode::Normal | InputMode::Locked => { + InputMode::Locked => { + Action::Write(key_with_modifier.cloned(), raw_bytes, key_is_kitty_protocol) + }, + mode if mode == default_input_mode => { Action::Write(key_with_modifier.cloned(), raw_bytes, key_is_kitty_protocol) }, InputMode::RenameTab => Action::TabNameInput(raw_bytes), |
