Skip to content

Commit

Permalink
Merge pull request #22 from honhimW/develop
Browse files Browse the repository at this point in the history
update: stream view using →/l | ←/h instead of Enter | Esc
  • Loading branch information
honhimW authored Oct 30, 2024
2 parents 9b0107f + efff73b commit 2c3814b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/stream_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ impl Renderable for SteamView {
fn footer_elements(&self) -> Vec<(&str, &str)> {
let mut elements = vec![];
if self.opt_for_id {
elements.push(("Enter", "Entry"));
elements.push(("→/l", "Entry"));
} else {
elements.push(("Esc", "Id"));
elements.push(("←/h", "Id"));
}
elements.push(("↑/j", "Up"));
elements.push(("↓/k", "Down"));
Expand All @@ -416,15 +416,15 @@ impl Listenable for SteamView {
self.previous();
true
},
KeyCode::Enter => {
KeyCode::Char('l') | KeyCode::Right => {
if self.opt_for_id {
self.opt_for_id = false;
true
} else {
false
}
},
KeyCode::Esc => {
KeyCode::Char('h') | KeyCode::Left => {
if !self.opt_for_id {
self.opt_for_id = true;
true
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,10 +1098,6 @@ impl Listenable for ExplorerTab {
}

if ValuesViewer == self.current_screen {
if KeyCode::Left == key_event.code || KeyCode::Char('h') == key_event.code {
self.toggle_screen(KeysTree);
return Ok(true);
}
if let Some(ref mut raw_value) = self.selected_raw_value {
if key_event.modifiers == KeyModifiers::NONE {
match key_event.code {
Expand Down Expand Up @@ -1163,6 +1159,10 @@ impl Listenable for ExplorerTab {
return Ok(true);
}
}
if KeyCode::Left == key_event.code || KeyCode::Char('h') == key_event.code {
self.toggle_screen(KeysTree);
return Ok(true);
}
}

if KeysTree == self.current_screen {
Expand Down

0 comments on commit 2c3814b

Please sign in to comment.