diff options
author | Aram Drevekenin <aram@poor.dev> | 2024-07-08 16:52:27 +0200 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2024-07-08 16:52:27 +0200 |
commit | cc6b5052f309a44962477b557bb67511fe76b280 (patch) | |
tree | 304980c78889d48483dbeb6f6ac5752f9f1db461 | |
parent | 765f1493cd34ec3905cd2933eed5b874ff7ca0cf (diff) |
fix(terminal): session-manager enter and some more keyskitty-fixes
-rw-r--r-- | default-plugins/session-manager/src/main.rs | 12 | ||||
-rw-r--r-- | zellij-utils/src/data.rs | 27 |
2 files changed, 39 insertions, 0 deletions
diff --git a/default-plugins/session-manager/src/main.rs b/default-plugins/session-manager/src/main.rs index 05a332866..9aebb6df5 100644 --- a/default-plugins/session-manager/src/main.rs +++ b/default-plugins/session-manager/src/main.rs @@ -197,6 +197,10 @@ impl State { self.new_session_info.handle_key(key); should_render = true; }, + BareKey::Enter if key.has_no_modifiers() => { + self.handle_selection(); + should_render = true; + }, BareKey::Char(character) if key.has_no_modifiers() => { if character == '\n' { self.handle_selection(); @@ -293,6 +297,10 @@ impl State { self.sessions.move_selection_up(); should_render = true; }, + BareKey::Enter if key.has_no_modifiers() => { + self.handle_selection(); + should_render = true; + }, BareKey::Char(character) if key.has_no_modifiers() => { if character == '\n' { self.handle_selection(); @@ -391,6 +399,10 @@ impl State { self.resurrectable_sessions.move_selection_up(); should_render = true; }, + BareKey::Enter if key.has_no_modifiers() => { + self.handle_selection(); + should_render = true; + }, BareKey::Char(character) if key.has_no_modifiers() => { if character == '\n' { self.handle_selection(); diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index c7ebb300d..54c056e35 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -288,6 +288,33 @@ impl BareKey { Ok("57361") => Some(BareKey::PrintScreen), Ok("57362") => Some(BareKey::Pause), Ok("57363") => Some(BareKey::Menu), + Ok("57399") => Some(BareKey::Char('0')), + Ok("57400") => Some(BareKey::Char('1')), + Ok("57401") => Some(BareKey::Char('2')), + Ok("57402") => Some(BareKey::Char('3')), + Ok("57403") => Some(BareKey::Char('4')), + Ok("57404") => Some(BareKey::Char('5')), + Ok("57405") => Some(BareKey::Char('6')), + Ok("57406") => Some(BareKey::Char('7')), + Ok("57407") => Some(BareKey::Char('8')), + Ok("57408") => Some(BareKey::Char('9')), + Ok("57409") => Some(BareKey::Char('.')), + Ok("57410") => Some(BareKey::Char('/')), + Ok("57411") => Some(BareKey::Char('*')), + Ok("57412") => Some(BareKey::Char('-')), + Ok("57413") => Some(BareKey::Char('+')), + Ok("57414") => Some(BareKey::Enter), + Ok("57415") => Some(BareKey::Char('=')), + Ok("57417") => Some(BareKey::Left), + Ok("57418") => Some(BareKey::Right), + Ok("57419") => Some(BareKey::Up), + Ok("57420") => Some(BareKey::Down), + Ok("57421") => Some(BareKey::PageUp), + Ok("57422") => Some(BareKey::PageDown), + Ok("57423") => Some(BareKey::Home), + Ok("57424") => Some(BareKey::End), + Ok("57425") => Some(BareKey::Insert), + Ok("57426") => Some(BareKey::Delete), Ok(num) => u8::from_str_radix(num, 10) .ok() .map(|n| BareKey::Char((n as char).to_ascii_lowercase())), |