fix(tui): handle 'End' key for bottom logs navigation
Update the TUI to handle both 'Shift+G' and 'End' keys for navigating to the bottom of logs. Adjusted the help widget text accordingly to reflect this change.
This commit is contained in:
parent
f1f2c796c4
commit
0cfd5dc89e
@ -171,7 +171,7 @@ impl HarmonyTUI {
|
|||||||
KeyCode::Char('q') | KeyCode::Esc => self.should_quit = true,
|
KeyCode::Char('q') | KeyCode::Esc => self.should_quit = true,
|
||||||
KeyCode::PageUp => self.tui_state.transition(TuiWidgetEvent::PrevPageKey),
|
KeyCode::PageUp => self.tui_state.transition(TuiWidgetEvent::PrevPageKey),
|
||||||
KeyCode::PageDown => self.tui_state.transition(TuiWidgetEvent::NextPageKey),
|
KeyCode::PageDown => self.tui_state.transition(TuiWidgetEvent::NextPageKey),
|
||||||
KeyCode::Char('G') => self.tui_state.transition(TuiWidgetEvent::EscapeKey),
|
KeyCode::Char('G') | KeyCode::End => self.tui_state.transition(TuiWidgetEvent::EscapeKey),
|
||||||
_ => self.score.handle_event(event).await,
|
_ => self.score.handle_event(event).await,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ impl Widget for HelpWidget {
|
|||||||
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
|
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
|
||||||
where
|
where
|
||||||
Self: Sized {
|
Self: Sized {
|
||||||
let text = Paragraph::new("Usage => q/Esc: Quit | j/↑ :Select UP | k/↓: Select Down | Enter: Launch Score | PageUp/PageDown: Scroll Logs | g/Home: Logs top | Shift+G/End: Logs bottom")
|
let text = Paragraph::new("Usage => q/Esc: Quit | j/↑ :Select UP | k/↓: Select Down | Enter: Launch Score\nPageUp/PageDown: Scroll Logs | Shift+G/End: Logs bottom")
|
||||||
.centered()
|
.centered()
|
||||||
.wrap(Wrap { trim: false });
|
.wrap(Wrap { trim: false });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user